[flexcoders] Re: flexcommon library 1.0 released
Here's the fix: http://stuffthathappens.com/blog/2007/11/09/howto-publish-javadoc-on-google-code/
[flexcoders] Re: flexcommon library 1.0 released
better yet: http://code.google.com/p/flexlib/wiki/HowToBuild
[flexcoders] Re: Extend Array
http://livedocs.adobe.com/flex/3/html/help.html?content=10_Lists_of_data_7.html discusses extending the Array class as a subclass using the dynamic attribute.
[flexcoders] Re: Extend Array
The option to create the matrix layout in a fixed manner is the crux. Most of the available matrix algebra algos (Transpose,Gauss-Jordan,etc) are coded with this 2D layout with exceptions of course.
[flexcoders] Re: Extend Array
Never tried the Vector class - can one get FB3 to recognize it?
[flexcoders] Re: Extend Array
This class works: public dynamic class Matrix2D extends Array { public function Matrix2D(nRows:int=0,nCols:int=0) { for (var k:int=0;knRows;k++) { this[k]=new Array(nCols); } } } Test prog: import com.freevryheid.statistics.Matrix2D; private function init():void { var a:Matrix2D=new Matrix2D(3,4); trace(a[0].length); } output 4
[flexcoders] Re: Extend Array
Bookmarked - thanks!
[flexcoders] Re: Extend Array
class: /** * A collection of 2D matrix functions for AS3. **/ public dynamic class Matrix2D extends Array { public function Matrix2D(nRows:int=0,nCols:int=0) { for (var k:int=0;knRows;k++) { this[k]=new Array(nCols); } } /** * Returns a square [n][n] matrix with all the elements set to zero. * * @param n Matrix length. * * @see #Identity() **/ public dynamic function Zero(n:int=0):Matrix2D { var a:Matrix2D=new Matrix2D(n,n); for (var i:int=0;in;i++) { for (var j:int=0;jn;j++) { a[i][j]=0.; } } return (a); } /** * Returns an identity matrix [n][n] with the diagonal elements set to one. * * @param n Matrix length. * * @see #Zero() **/ public dynamic function Identity(n:int=0):Matrix2D { var a:Matrix2D=new Matrix2D(n,n); for (var i:int=0;in;i++) { for (var j:int=0;jn;j++) { if (i==j) { a[i][j]=1.; } else { a[i][j]=0.; } } } return (a); } } test: import com.freevryheid.statistics.Matrix2D; private function init():void { var b:Matrix2D=new Matrix2D(); trace(b.Identity(3)) } outputs: 1,0,0,0,1,0,0,0,1
[flexcoders] Re: flexcommon library 1.0 released
Documentation link doesn't work for me - opens as html text in browser.
[flexcoders] Extend Array
I'm trying to extend an Array into a 2D matrix. Any suggestions? The following code fails but I don't understand why. public class MatRix extends Array { public function MatRix(numRows:int=0,numCols:int=0) { super(numRows); for (var i:int=0;inumRows;i++) { for (var j:int=0;jnumCols;j++) { this[j]=new Array(); } } }
[flexcoders] Re: flexcommon library 1.0 released
Interesting. Yep, I tried using Firefox.
[flexcoders] Re: Extend Array
This compiles OK but fails at this point in the class: this[i]=new Array(numCols); with the error: Cannot create property 0 on [the class] i.e i being 0 on the first for loop when calling: var a:MatRix = new MatRix(3,3);
[flexcoders] Re: Extend Array
Thanks - you guys rock! Good point about the geom matrix class. I'm coding some matrix algebra algorithms. Actually I hadn't given it much thought just considered the possibility of using the sorting function in the Array class.
[flexcoders] Re: anyone know of a good (free) flex component for playing video/swfs?
Tried this - not sure if it plays swf? http://www.fxcomponents.com/flex-video-player/ --- In flexcoders@yahoogroups.com, gmoniey22 gmonie...@... wrote: I'm looking for a simply (and reliable) flex component which can play a flv or a swf and has the basic controls (Play/Pause/Progress bar) Any suggestions? Thanks
[flexcoders] Re: How to put a well-formatted SQL statement in a string?
Calling mssql procs through flex can be done using pyamf. Here's some code using pyamf: http://freevryheid.x10hosting.com/drupal/?q=node/15 --- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote: I have to embed my SQL within Flex until I can work out how to call a SQLServer proc from within Flex (any pointers here would be much appreciated), and am writing functions: private function sel_mrkt_pln_yrs(p_string:String = null):String{ var sqlString:String = select distinct issue_yr, cast(issue_yr as Int) as ID from MKT_PLN where (case when + p_string + is not null then case when mkt_pln_typ = + p_string + then 1 end else 1 end) = 1 order by 1 desc;; return sqlString; } I would like to format the SQL so I can read it: select distinct issue_yr, cast(issue_yr as Int) as ID from MKT_PLN where (case when @p_mkt_pln_typ is not null then case when mkt_pln_typ = @p_mkt_pln_typ then 1 end else 1 end) = 1 order by 1 desc; but var sqlString:String = ... will not take the separate lines etc. How are people doing this? TIA, Mic.
[flexcoders] flexiBoard - Crafty chess frontend
I've developed a frontend to the Crafty chess engine. A win32 alpha version is available for download at: http://flexiboard.riaforge.org/ The zip contains everything you need to play chess. Check the INSTALL.TXT file for instructions. The source code is also available via subversion at riaforge. I'd appreciate any comments, bug reports etc. The app is playable but still under development. I can use some help to port to linux and mac and to wrap it up if anyone is interested.
[flexcoders] Re: Recommended MVC for Flex/AS?
ActionJack isn't mentioned: http://www.beamjive.com/weblog/?p=38 --- In flexcoders@yahoogroups.com, Alex Ninan fle...@... wrote: Take a look at the attached link http://www.summa-tech.com/blog/2009/01/14/selecting-the-right-flex-application-framework/ On Tue, Mar 3, 2009 at 11:38 AM, Adrian Williams adri...@...wrote: Hi All, I'm curious as to what our overall community would recommend, why and the pros/cons of the various MVC's that are out there for Flex/AS. Thanks, Adrian
[flexcoders] Compressed swf
swf files appear to be compressed - headers start with PK. I was comparing the swf filesizes of different flex frameworks Cairngorm, Mate, PureMVC, etc and found significant differences. Cairngorm, for example, was down to 11 KB. How does one compress your swf down to this size.
[flexcoders] Re: Define repeaters at runtime
--- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: So that the doc team understands... What is it that you found surprising? That an Array can hold anything, including references to components? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of smitade Sent: Thursday, February 26, 2009 9:50 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Define repeaters at runtime It works - please ignore the previous post. Wow, the ability to push components into arrays like this opens up so many possibilities - especially when working with flex frameworks. I find it strange the documentation doesn't highlight this feature - otherwise I missed it. Thanks again! Gordon - sorry for the confusion - I'm confused myself! When I started this thread I was looking for a way to dump components into an Array e.g. 64 Images into an array ImageArray so that I could set the properties of the images by setting the array directly e.g. for (i=0;i64;i++) { ImageArray[i].source=some.png; } I mistakenly thought it was working as initially all of the 64 images have the same source and this was showing up correctly. What I found out that this is not the case (and probably why I didn't find it in the docs). I understand that arrays can hold references to components so I've recoded to push and pop the images from ImageArray to set the properties on the individual Images. I liked the functionality of using a repeater defined in MXML where I could reference my ImageArray directly. I haven't found a way to define this repeater at runtime though. Sorry for the long reply - hope it makes sense.
[flexcoders] Define repeaters at runtime
Is it possible to define repeaters at runtime? I've scanned the web and didn't find anything. I would like an Image array defined within a repeater but WITHOUT using the mxml mx:Repeater id=myRepeater dataProvider=... mx:Image id=myImage/ /mx:Repeater . . . . so that I can access it later in the code: myImage[10].source=... Thanks
[flexcoders] Re: Define repeaters at runtime
Thanks Pedro So is it possible to define an Image Array without a repeater? I'd like to run through 64 Images using: for each (var img:Image in ImageArray) { ... etc } Back to google.
[flexcoders] Re: Define repeaters at runtime
Tried this but it failed: In Model.as public var a_red:Array=new Array(); then later: Model.getInstance().a_red[1].source=Model.getInstance().red_source; where red_source is a png image. for (var i:int=0;i64;i++) { Model.getInstance().a_red.push(Model.getInstance().red); } then: trace(Red Image: ,Model.getInstance().red[1].source); Error #1069: Property 1 not found on mx.controls.Image and there is no default value.
[flexcoders] Re: Define repeaters at runtime
It works - please ignore the previous post. Wow, the ability to push components into arrays like this opens up so many possibilities - especially when working with flex frameworks. I find it strange the documentation doesn't highlight this feature - otherwise I missed it. Thanks again!
[flexcoders] pair
Is pair (http://pair.collab.eu/) dead? Pair is an Actionscript3 implementation of the Python standard library. It's been a while since the site was updated. Any alternatives out there?
[flexcoders] Re: [silvafug] Calling C++ app or service from flex on Mac
--- In flexcoders@yahoogroups.com, Shailesh Mangal shailesh.man...@... wrote: Have you looked at Merapi? You can either use JNI with Merapi to call you dll or write similar socket based bridge in C++ -Shailesh On Feb 22, 2009, at 7:50 AM, Priya Shah wrote: Hi everyone, I am in dire need of being able to call a C++ app or service on Mac from flex. I am willing to go the AIR way for this though that's not optimal. I have spent some time trying to figure out the Netscape plugin architecture which is supported on safari but it's sub- optimal for me to go that route. I already have a C++ dll that I have invoked with flex on the Windows side using an Active/X plugin successfully. Now I need to compile the dll into some format on Mac and then communicate back and forth with flex. I have seen some open source bridge projects that enclose flash player in an MFC object but that doesn't help me on mac. Is it as simple as doing some Netstream class from flex to connect to either an app or a service (if there are services on Mac like there are on Windows) and just do a localhost communication back and forth? If so, what are the limitations of such approaches? Any sample apps out there? Regards Priyanka ... or using a python sockets server - see flexiBoard on riaforge.
[flexcoders] Re: Mouse click drop
Ok - let me provide some code. First define one of many images. That's what ChessPiece is. ns:ChessPiece id=img_bqr x={Number(ary.getItemAt(0))} y={Number(ary.getItemAt(0))} source={png_br} color=black rank=rook pos=a8 mouseDown=movePiece(event)/ Then in the movePiece function create the event listener. cv is my canvas on which the images are: private function movePiece(e:MouseEvent):void { if (drag) { cv.currentTarget.addEventListener(MouseEvent.MOUSE_MOVE, dragPiece); Then the dragPiece callback: private function dragPiece(e:MouseEvent):void { e.currentTarget.x=cv.mouseX-40; e.currentTarget.y=cv.mouseY-40; }
[flexcoders] Mouse click drop
I'm developing an app with click and drop as opposed to drag and drop. I have a bunch of images on a canvas. When I click an image it adds a MOUSE_MOVE event listener to the canvas. I then relocate the image based on the canvas mouseX and mouseY movement. This event is removed when I click the mouse a second time. As you can understand, this work well if the image stays under the mouse, but goes haywire when the mouse is moved over other images or if you move the mouse too quickly. I could disable all the other objects on the canvas from responding to the mouse movement but is there a better way to go about this.
[flexcoders] proxy.php
I'm connecting my Flex 3 app to a web service that doesn't have a crossdomain.xml file. I've set up a proxy (php file I got off the web) to read the WSDL from the web service and this works when I connect to the service through Flex Builder. When I upload the flex app to my server, however, the app fails with the security fault when connecting to the service. Debugging using Charles shows that the app is trying to GET crossdomain.xml from the web service. It was my understanding from the flex documentation that using a proxy would negate the crossdomain.xml requirement. Am I missing something? Also, why would it work through Builder and not from the server? TIA