Reputation: 377
how i can display a symbol from the .swf
on canvas
.. i have exproted the .fla file from the flash CS3 as .swf file...
Upvotes: 0
Views: 327
Reputation: 391
[Embed(source='pathToSwf.swf', symbol="ExportForActionscriptSymbolName")]
private var MySwfSymbol:Class;
then you can add it to the stage like this:
var swfSymbol:MovieClip = new MySwfSymbol();
canvasId.addChild(swfSymbol);
HOWEVER, this does not work if the symbol has only one frame. In the event that it has only a single frame, you will need to do this:
var swfSymbol:Sprite = new MySwfSymbol();
canvasId.addChild(swfSymbol);
Upvotes: 1