actionscript

What exactly does var x:* mean in actionscript ?

Its a little tricky to search for 'var:*' because most search engines wont find it. I'm not clear exactly what var:* means, compared to say var:Object I thought it would let me set arbitrary properties on an object like : var x:* = myObject; x.nonExistantProperty = "123"; but this gives me an error : Property nonExistantProperty n...

Can an Actionscript component listen to its own propertyChange events?

I have a CircleButton class in Actionscript. I want to know when someone externally has changed the 'on' property. I try listening to 'onChange' but it never hits that event handler. I know I can write the 'on' property as a get/setter but I like the simplicity of just using [Bindable] Can an object not listen to its own events? publi...

Do you need to put something in your code to access an asset allowed by crossdomain.xml?

Wondering if I need to do something in my swf to be able to access the assets on a different server, meaning more than just specify the url to the asset. Will flash handle the 'go get crossdomain.xml and authenticate everything' behind the scenes or do I need to include some special code beyond simply requesting the swf file? ...

How do you specify a custom location for crossdomain.xml in actionscript?

We are hosting the swf assets on a media hosting server and can't get a file to the root, anyone know what the code looks like to specify a custom location for crossdomain.xml? Sample code if you have it. ...

Usage of inline closures / function delegates in Actionscript

Why are inline closures so rarely used in Actionscript? They are very powerful and I think quite readable. I hardly ever see anyone using them so maybe I'm just looking at the wrong code. Google uses them in their Google Maps API for Flash samples, but I think thats the only place I've seen them. I favor them because you have access to ...

Garbage collection in Flex when removeChild() is called - managing race conditions

I have a 'framework' in Flex which loads and destroys child 'sections', which are instances of module classes. These have a lot of webservice and animation in them and are part of a public facing site. Before I remove a section from the screen I call a 'hideSection()' interface method on the instance. In this method I fade out any contr...

How do you learn a new skill/framework/technology?

I need to be able to contribute to a relatively large Adobe AIR project and I'm starting from scratch with this technology. What's the best way to go about it? I usually get a good book/tutorial and work my way through it but this time it seems there's just too much to learn for this to be feasible within a reasonable time frame. I woul...

Automated testing (non-UI) for existing Flash component

I build and maintain a set of Flash components that is distributed to publishers and allows them to integrate with our system. Currently the component has no UI and simply contains compiled code for querying our system servers, parsing the response, and modifying the params sent in the query. There's an As2 version and AS3 versions for b...

Loading Flex resources relative to server root as opposed to .swf location

I have a large (700kb) Flex .swf file representing the main file of a site. For performance testing I wanted to try and move it off to Amazon S3 hosting (which i have already done with certain videos and large files). I went ahead and did that, and updated the html page to reference the remote .swf. It turns out that Flash will load...

Source for Flash based RSS1/RSS2/ATOM/RDF reader?

Does anyone know where to find a good, opensource RSS reader in Flash? I see lots that implement RSS or ATOM or RSS2, but none that do all of the different RSS style formats out there. I'd prefer to keep this in Flash, as I'm trying to keep this so it'll run with minimal server requirements... Requirements: - Parses RSS1/RSS2/ATOM/RDF, ...

Flex Builder 3: Debugger traces error, when fixing the as file, keeps throwing same error, stuck in past

I'm running my first project that I'm compiling with flex builder. Before I used to compile with flash or flash develop. For a while it worked pretty neatly. But as soon as it start throwing typeerrors, I can't seem to compile the updated and saved actionscript files. It seems as if it keeps stuck in time and compiles the actionscript f...

How does one cancel/unaccept a drag-and-drop operation in Flex 3?

Goal: Allow the user to delete a record by dragging a row from an AdvancedDataGrid, dropping it onto a trash-can icon and verify the user meant to do that via a popup alert with "OK" and "Cancel" buttons. What is working: Dragging/Dropping a row onto the trash icon. If the user clicks the "OK" button, the record is deleted....

What's the 'static void Main' equivalent in Flash?

I am trying the FDT editor on a project that previously ran successfully in Flash CS3. FDT builds and runs it successfully but the SWF is blank (white). I've tried a few viewers on the output file and it is actually blank. One difference is that now my project doesn't seem to include my entry .fla file. I'm new to Flash/ActionScript ...

Mysterious assets used in swf, not found anywhere in fla?

near the top of the code i see things like, btn_dropdown._visible = false; mcMenuBkg._visible = false; but I can't find these assets anywhere in the library or in any code, how does this make any sense? The movie clips in the library that look the same have different names and I can delete them entirely and they still show up when I ...

Best method to scroll a ScrollPane by mouse hover location in actionscript?

When mouse nears top edge of scrollpane, it scrolls up until it reaches the top only interrupted if the mouse leaves the top edge area. Same for bottom edge. ...

How do you tell a ScrollPane to scroll up or down using actionscript?

I want to trigger an event that causes the ScrollPane to start scrolling up or down. Ideally the ScrollPane would scroll continue to scroll all the way up or down unless canceled by another event. ...

POST Login with ActionScript 2.0

I have created a pretty basic Flash website for a client and am having an issue programming a Client Login feature that he would like. Currently, if I navigate to the site and click Client Login, it takes me to a login page. The way I need this to work is -- within the Flash, using ActionScript 2.0 -- have the user enter their UserID and...

Flex cannot deserialize webservice element that contains only attributes

I'm seeing a very strange issue with a .NET webservice being consumed by Flex. I have a very simple class with nothing other than properties with [XmlAttribute('xxx')] attributes. public class OrderAddress { public OrderAddress() {} [XmlAttribute("firstName")] public string FirstName { get; set; } [XmlAttribute("lastN...

ExternalInterface Performance: Looking for Some Best-Practices/Tips

Hi there: I'm using Flex 3 in the UI of a Windows app (Flash player as an embedded ActiveX control), and passing data between them with ExternalInterface (primarily into the Flex app, as opposed to out). I'm finding, though, that the performance is pretty awful, particularly with larger (i.e., custom) objects; the more EI calls we make,...

How can I reload a datagrid in flash action script, after an xml file has loaded

Hi Everyone, Does anyone know how to change the rowcount of a datagrid in flash after it has been created on the stage. I am loading an xml file externally that contains the number of rows the datagrid should have, but the problem is that becuase this file is not loaded at runtime, it just picks the default 3 items. Maybe I have to rel...