Understanding Flash SWC's imported into Flex Builder 3 and key framed animation

Posted by Hank Scorpio on Stack Overflow See other posts from Stack Overflow or by Hank Scorpio
Published on 2010-03-25T00:58:29Z Indexed on 2010/03/25 1:03 UTC
Read the original article Hit count: 521

Filed under:
|
|
|
|

I am trying to understand what is going on in a SWC that I am importing from Flash CS4 into Flex Builder 3. Specifically I am using a SWC supplied by a Designer as the animation for a custom preloader (a subclassed DownloadProgressBar).

The issue I am trying to understand is, once the FlexEvent.INIT_COMPLETE is fired, I cleanup by removing the swc by running this :

removeChild(myPreloader);
myPreloader = null;

though even after I have removed this (which is successful, as I have checked by comparing this.numChildren before and after the call) the key framed animation still continues to run (not visibly). This has been detected by the Designer placing a trace in the time line of the animation (in Flash).

Can anyone tell me why is it, that even after I have removed the animation from the subclassed DownloadProgressBar, it still keeps running ?

Also, is it standard practice when importing SWCs to manage the cleanup of resources from the Flash side of things (much like releasing memory in obj-c). I find it counter intuitive that removing the child from the Flex side does not stop the animation.

Any clues to this would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about flex

Related posts about flash