tags:

views:

2143

answers:

2

I have a symbol in a .swf's library, with a linkage name of "Pana". The Pana symbol is just a 100 frame animation that I would like to have timeline control over in Flex. So how can I load the .swf and then add the Pana symbol to the display list and control it's timeline?

Thanks!

A: 

You would use the getDefinition function from the ApplicationDomain Class. A fairly simple example can be found here:

http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7e07.html

Christopher W. Allen-Poole
A: 

You can embed that symbol in your MXML:

[Embed(source="yourlib.swf#SymbolName")]
private var swfSymbol:Class;

And then use it as:

// Cast it as MovieClip
var symb:MovieClip = new swfSymbol() as MovieClip;
addChild(symb);
// And control the timeline
symb.gotoAndPlay('someFrameLabel');
Tehnomaag