Flash 9.0.16.0 problem - ADDED_TO_STAGE

I just came across a problem with a Flex application I have been working on. It was working fine on all machines I was testing it on, but I was getting user errors reported.

Finally manage to reproduce the error on an random machine in the office and got to the bottom of it. It turns out the machine had flash 9.0.16.0 on it so it passed our version check but we were relying on a feature that was only introduced in a later version 9.0.28.0.

The feature was ADDED_TO_STAGE. We were using this event to wait until we had the stage properties available so we could configure the application correctly.

Solution was to change to using the ApplicationComplete event in the Application to fire off the initialization.

Hope it helps someone.

Cheers, Mark

Comments
Yep, that's a problem. senocular (and other's) have made a custom class to deal with this issue. Senoculars is at http://www.senocular.com/flash/actionscript.php under "com/sencular/events/StageDetection"

The book "Essential ActionScript 3.0" by Colin Moock also discuss this issue under Containment Events (starting at page 524) and end up making a custom StageDetector.

Just some extra info for those who will dig into different solutions to this issue.

Hope it is ok.

All the best
/ockley
# Posted By ockley | 8/2/07 5:52 PM
Hi Ockley,
Thanks for the info.
Cheers,
Mark
# Posted By Mark Lynch | 8/2/07 8:10 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.1.004.