Friday, 6 September 2013

Remove a Movieclip from an Array

Remove a Movieclip from an Array

I'm very new to ActionScript 3.0, so be gentle. :P I'm making a simple
'custom gun' program where you can cycle through the different parts of
the weapon to give it a unique appearance. For example, you have the
'barrel' and the magazine'. Each part is a movieclip with frames for the
different options.
Parent Movie Clip: Barrel Frames within are labeled, each with an MC. Each
MC in there has 4 layers labeled "Paint, Details, Metal, Light".
I have an array of the current parts.
var paintList:Array = new Array (Base.Paint, Bar.BarStandard.Paint,
Mag.MagStandard.Paint, etc.);
Now what I need is to remove a specific piece from that array. So for the
above example, how would I just remove the Bar.BarStandard.Paint and add
instead Bar.BarExtended.Paint?
Hopefully this makes sense and someone can help! :C

No comments:

Post a Comment