Sunday, January 9, 2011

Accessing the Timeline of a loaded SWF in AS3

While Flex provides you with a designated component for loading and communicating with external SWF files,
when you work in Flash - you are not that lucky.
In AS2, you could load an external SWF into a MovieClip and then target it using that MovieClip instance.
In AS3 however, things are not that easy: External SWF files are loaded using the Loader Class,
and in order to get access to their timeline - you must get a reference to that loader's contentLoaderInfo property.

Take a look at this example:

You can download the source here.

No comments:

Post a Comment

About Me

My photo
I've been developing Internet and rich-media application for 15 years. In my work I emphasis usability and best user experience as well as sleek design. My main expertise are JavaScript, Flex and Flash.