how to Display a Symbol from the .SWF file on Canvas?
how i can display a symbol from the .swf
on canvas
.. i have exprot开发者_高级运维ed the .fla file from the flash CS3 as .swf file...
[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);
精彩评论