In actionscript 2.0, the following codes dynamically attach a
in the library to the stage:
where symbol0 ~ symbol9 are linkage id of 10 symbols in the
While in ActionScript 3.0, I have a difficulty doing similar
If I want to attach a symbol to the stage, the code may look
var a_mc:MovieClip=new Symbol0();
but I don't know how I can attach randomly
1 var i:int=Math.floor(Math.random()*10);
2 var a_mc:MovieClip=new [Symbol+i]();
I found I need script like line 2, but it doesn't work
Is the convenient way to do this?
thanks very much for help!