03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

■ Array.UNIQUESORT or 4<br />

■ Array.RETURNINDEXEDARRAY or 8<br />

■ Array.NUMERIC or 16<br />

Code hinting is enabled if you use the string form of the flag (for example, DESCENDING)<br />

rather than the numeric form (2).<br />

Returns<br />

Array - The return value depends on whether you pass any parameters, as described in the<br />

following list:<br />

■ If you specify a value of 4 or Array.UNIQUESORT for the options parameter, <strong>and</strong> two or<br />

more elements being sorted have identical sort fields, Flash returns a value of 0 <strong>and</strong> does<br />

not modify the array.<br />

■ If you specify a value of 8 or Array.RETURNINDEXEDARRAY for the options parameter,<br />

Flash returns an array that reflects the results of the sort <strong>and</strong> does not modify the array.<br />

■ Otherwise, Flash returns nothing <strong>and</strong> modifies the array to reflect the sort order.<br />

Example<br />

The following example creates a new array <strong>and</strong> sorts it according to the name <strong>and</strong> city fields.<br />

The first sort uses name as the first sort value <strong>and</strong> city as the second. The second sort uses<br />

city as the first sort value <strong>and</strong> name as the second.<br />

var rec_array:Array = new Array();<br />

rec_array.push({name: "john", city: "omaha", zip: 68144});<br />

rec_array.push({name: "john", city: "kansas city", zip: 72345});<br />

rec_array.push({name: "bob", city: "omaha", zip: 94010});<br />

for(i=0; i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!