i’m looking for a best approach to the following problem. I have an array that contains movieclips. All of the movieclips have te type and they are all positioned on the stage next to eachother.
Above the displayed movieclips i have 3 buttons, each simbolizing a type, what i want to do is: i click on one of the buttons and all of the movieclips that dont match the right type should be removed from the stage, the remaining movieclips should then tween so that they are next to eachother again.
If i click the button again then the movieclips should be displayed again to where they were and should all be positioned again next to eachother.
What would be the best approach to handle this?
Alternatively, try using Array.filter.
I’ve left out the implementation for display(). I usually use Greensock’s TweenNano to tween elements.