AS3 Arrays: Access elements in a string array

//String array

Example

var aString:Array = new Array ("Name", "Address", "State", "Zip", "Phone");
trace(aString);
//returns the contents of the array
trace(aString[1]);
//trace the position of an object in an array. Index position must be in brackets. This trace would return "address".
trace(aString.length);
//returns the length of the array. This trace would return "5"

Leave a Reply