I often need to set the alpha of all but one of a list of objects.
beastie1.alpha = 0;
beastie2.alpha = 1;
beastie3.alpha = 0;
beastie4.alpha = 0;
I am wondering what is the best way to do this with a for loop?
private var beastieArray:Array = new Array(beastie1,beastie2,beastie3,beastie4);
for (var i:int = 0; i < beastieArray.length; i++)
{
beastieArray*.alpha = 0;
}
This loop obviously sets all of the objects in beastieArray to alpha = 0. is there a way to leave one index out of the loop?
Thanks!