flex

Unloading a ByteArray in Actionscript 3.

Does anyone know how to forcefully unload a ByteArray from memory in AS3? I have tried (without success): byteArray.length = 0;byteArray = new ByteArray();andfor ( var i:int=0; i<byteArray.length; i++ ) { byteArray[i] = null;} Any ideas?...

Adobe air - SQLStatement.execute() - Multiple queries in one statement

I've written a database generation script in sql, and want to execute it in my Adobe air application: Create Table tRole ( roleID integer Primary Key ,roleName varchar(40));Create Table tFile ( fileID integer Primary Key ,fileName varchar(50) ,fileDescription varchar(500) ,thumbnailID integer ,fileFormatID integer...

Get the current logged in OS user in Adobe Air

I need the name of the current logged in user in my Air/Flex application. The application will only be deployed on Windows machines. I think I could attain this by regexing the User directory, but am open to other ways....

Best way to learn Flash?

I am interested in learning how to write Flash programs, but I'm not ready to shell out the big bucks for Flash CS3 Professional. What's the best compromise between affordability and education? Edit: @sparkes: Given that this is for personal education only, and not something I'm likely to use for professional purposes anytime soon, I'm...

How can I unit test Flex applications from within the IDE or a build script?

I'm currently working on an application with a frontend written in Adobe Flex 3. I'm aware of FlexUnit but what I'd really like is a unit test runner for Ant/NAnt and a runner that integrates with the Flex Builder IDE (AKA Eclipse). Does one exist? Also, are there any other resources on how to do Flex development "the right way" beside...

Adobe Air - Using multiple SQLite databases at once

I have 2 SQLite databases, one downloaded from a server (server.db), and one used as storage on the client (client.db). I need to perform various sync queries on the client database, using data from the server database. For example, I want to delete all rows in the client.db tRole table, and repopulate with all rows in the server.db tRo...

Actionscript 3 - Fastest way to parse yyyy-mm-dd hh:mm:ss to a Date object?

I have been trying to find a really fast way to parse yyyy-mm-dd [hh:mm:ss] into a Date object. Here are the 3 ways I have tried doing it and the times it takes each method to parse 50,000 date time strings. Does anyone know any faster ways of doing this or tips to speed up the methods? castMethod1 takes 3673 ms castMethod2 takes 3812...

Can you access the windows registry from Adobe Air?

(y/N) Edit: Read-only access is fine....

Adobe Flex component events

I have a component I wrote that display a filename, a thumbnail, and has a button to click on to load/play the file. The component is databound to a repeater. How can I make it so the button event fires to the main application and tells it which file to play?...

Flex / Air obfuscation

I've written (most of) an application in Flex and I am concerned with protecting the source code. I fired up a demo of Trillix swf decompiler and opened up the swf file that was installed to my Program Files directory. I saw that all of the actionscript packages I wrote were there. I'm not too concerned with the packages, even though the...

Open local file with AIR / Flex

I have written an AIR Application that downloads videos and documents from a server. The videos play inside of the application, but I would like the user to be able to open the documents in their native applications. I am looking for a way to prompt the user to Open / Save As on a local file stored in the Application Storage Directory. ...

How do I get rid of the "multiple describeType entries" warning?

Does anyone know why when using BindingUtils on the selectedItem property of a ComboBox you get the following warning? Any ideas how to resolve the issue? The binding still works properly, but it would be nice to get rid of the warning. warning: multiple describeType entries for 'selectedItem' on type 'mx.controls::ComboBox':<accessor ...

Is it possible to add behavior to a non-dynamic ActionScript 3 class without inheriting the class?

What I'd like to do is something like the following: FooClass.prototype.method = function():String { return "Something"; } var foo:FooClass = new FooClass(); foo.method(); Which is to say, I'd like to extend a generated class with a single method, not via inheritance but via the prototype. The class is generated from a WSDL, it'...

Printing Flex components in FireFox 3

Thanks to FireFox's buggy implementation of ActiveX components (it really should take an image of them when printing) Flex components (in our case charts) don't print in FX. They print fine in IE7, even IE6. We need these charts to print, but they also have dynamic content. I don't really want to draw them again as images when the use...

How can I "unaccept" a drag in Flex?

Once I've called DragManager.acceptDrag is there any way to "unaccept" the drag? Say that I have a view which can accept drag and drop, but only in certain areas. Once the user drags over one of these areas I call DragManager.acceptDrag(this) (from a DragEvent.DRAG_OVER handler), but if the user then moves out of this area I'd like to ch...

Deleting / Replacing A Node in E4X (AS3 - Flex)

I'm building a listing/grid control in a Flex application and using it in a .NET web application. To make a really long story short I am getting XML from a webservice of serialized objects. I have a page limit of how many things can be on a page. I've taken a data grid and made it page, sort across pages, and handle some basic filteri...

How do I restyle an Adobe Flex Accordion to include a button in each canvas header?

Here is the sample code for my accordion: <mx:Accordion x="15" y="15" width="230" height="599" styleName="myAccordion"> <mx:Canvas id="pnlSpotlight" label="SPOTLIGHT" height="100%" width="100%" horizontalScrollPolicy="off"> <mx:VBox width="100%" height="80%" paddingTop="2" paddingBottom="1" verticalGap="1"> <mx:Repeater id="rptrS...

Any recommendations for in-depth Flex training?

I have several months experience creating Flex applications, but I'm interested in diving in a little deeper. My projects so far have involved web services and graphing work to create RIAs. In particular, I'm probably most interested in training related to: BlazeDS & LiveCycle Data Services Custom (visual) components / graphing I'm...

SoapException: Root element is missing occurs when .NET web service called from Flex

I have a .net web application that has a Flex application embedded within a page. This flex application calls a .net webservice. I can trace the execution proccess through the debugger and all looks great until I get the response: soap:ReceiverSystem.Web.Services.Protocols.SoapException: Server was unable to process request . ---> S...

Flex: does painless programmatic data binding exist?

I've only done a bit of Flex development thus far, but I've preferred the approach of creating controls programmatically over mxml files, because (and please, correct me if I'm wrong!) I've gathered that you can't have it both ways -- that is to say, have the class functionality in a separate ActionScript class file but have the containe...