Mega Code Archive

 
Categories / Flash ActionScript / Array
 

Use the Array constructor allows you to specify the length of the new array

package{   import flash.display.Sprite;      public class Main extends Sprite{     public function Main(){         var topTen:Array = new Array(10);         // creates an array with 10 spaces.         trace(topTen.length);     }   } }