Mega Code Archive

 
Categories / Flash ActionScript / Statement
 

Use for each loop to go through the array elements

package{   import flash.display.Sprite;      public class Main extends Sprite{     public function Main(){         var games:Array = ["P","S","L"];                  for each (var game:* in games) {           trace(game);         }     }   } }