Hi Kevin,

You can use the Vector.forEach() to streamline your code. Something
like:

// replace the for...each loop with
snowflakes.forEach( updateSnowflakes );


// function in your class
private function updateSnowflakes(item:Sprite3D, index:int,
vector:Vector.<Sprite3D>):void {

   if(item.y < 0)
   {
     item.y = 300;
   }

  item.y -= 10;
}

Reply via email to