0
votes

how i can display a symbol from the .swf on canvas.. i have exproted the .fla file from the flash CS3 as .swf file...

1
I dont understand what you want to do, do you want to embed the swf file inside a Canvas element, or you want to somehow extract one sybol from .swf file?Ladislav
i want to extract one symbol from .swf and want to embed it in canvas.Muhammad Husnain Ashfaq
I don't think you can do that, you would have to make a swf or an image or someting for each symbol you want to use, I just do not see a way to show only one symbol from a compiled swf file of multiple symbols...but I could be wrong...Ladislav

1 Answers

1
votes
[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);