Saturday, July 19, 2008

Actionscript 3's Array and String are now more improved and has a lot of methods found only in the popular scripting languages such as Perl, Python, etc.

If you are not aware of these changes, you should hop over to
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Array.html
right away.

New array methods you will find useful:

indexOf, lastIndexOf
every, some
filter - filter out the items that pass your test into a new array
forEach - transform all array items in one fell swoop in place
map - similar to forEach, but returns the new transformed items in new array


Some of the new useful string methods:
search
match
replace - no more custom solution!

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home