• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Objects

Objects

The following tables outline some of the built-in Flash objects and methods used in this book. For more information on the built-in Flash 5 objects, please refer to the Flash 5 ActionScript Dictionary (Help > ActionScript Dictionary).

Array Object

Property/Method Syntax and Description Example(s)
length myArray.length; Property of the Array object that returns the length of the array.
mySharks [3] = hammerhead;
trace (mySharks.length);

The output window would display 4 since there are 4 items (0 to 3) in this array.
sort myArray.sort(orderFunc); Sorts the array. The orderFunc argument specifies the order that the array is sorted. The orderFunc argument can be –1 (A appears before B in the sorted sequence, or alphabetical order), 1 (A appears after B in the sorted sequence, or reverse alphabetical order), or 0 (A equals B in the sorted sequence). mySharks.sort();



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint