View Single Post
Old 26-03-2008, 21:34   #1 (permalink)
Hysteria
Registered User
 
Join Date: Feb 2008
Posts: 17
for loop question

I have a for loop that creates an amount of square sprites with random proprieties:
Code:
for (var i:Number=0; i<numBasicDots; i++) { var mySprite:Sprite = new Sprite(); mySprite.graphics.beginFill(colorArray[randRange(0,colorArray.length)], 1); mySprite.graphics.lineStyle(randRange(1,5), colorArray[randRange(0,colorArray.length)], 1, true) mySprite.graphics.drawRect(randRange(0,300), randRange(0,300), randRange(1,600), randRange(1,600)); mySprite.filters = filterArray[randRange(0,filterArray.length)]; addChild(mySprite); }

anyone knows how I can delete all of these sprites at the same time?
  Reply With Quote