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:

  1. open library f11
  2. select bird movie clip
  3. open symbol properties window (right click->properties)
  4. select "export as" check box
  5. assign class name symbol, instance mybird

now can instantiate class many times want code:

dostuff(new mybird()); 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -