Link to home
Start Free TrialLog in
Avatar of yarekGmail
yarekGmail

asked on

flash: how to add elements dynamically ?

Hello, I have in my Fla (cs5) these symbols:
Backgorund1
Background2
Background3

All these extends MovieClips

My goal is to add them dynamically to stage accordign to level variable:
ex:

   var level:int = 1;
   
    var bg:MovieClip =new getClassByName("Background"+level);
   
    stage.addChild(bg);



Any idea on how to do that ?

Regards
ASKER CERTIFIED SOLUTION
Avatar of nightmare3d
nightmare3d

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial