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.

output:<br />

P<br />

A<br />

T<br />

S<br />

Y<br />

The following example returns an array with two elements, "P" <strong>and</strong> "A":<br />

var my_str:String = "P,A,T,S,Y";<br />

var my_array:Array = my_str.split(",", 2);<br />

trace(my_array); // output: P,A<br />

The following example shows that if you use an empty string ("") for the delimiter<br />

parameter, each character in the string is placed as an element in the array:<br />

var my_str:String = new String("Joe");<br />

var my_array:Array = my_str.split("");<br />

for (var i = 0; i

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

Saved successfully!

Ooh no, something went wrong!