actionscript 3 - How do I copy an instanced MovieClip multiple times programmatically? -
i'm extremely new flash/actionscript, i've done c#, java , c++... anyway, question is:
if have movieclip called bird1, , need following:
dostuff(bird1); dostuff(bird2); dostuff(bird3);
where bird2 , bird3 exact copies of bird1, new instances....
how can until dostuff(bird30); without having copy 30 times , write out?
thanks in advance..
you should assign class name symbol of bird
in library:
- open library f11
- select bird movie clip
- open symbol properties window (right click->properties)
- select "export as" check box
- assign class name symbol, instance
mybird
now can instantiate class many times want code:
dostuff(new mybird());
Comments
Post a Comment