开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜