Ramblings

November 9, 2006

inArray Method for JavaScript and ActionScript

Filed under: flash — michaelangela @ 12:15 pm

Lo and behold… actionscript (2.0 at least) does not seem to have a way of checking if an item is in an array. Here is a snippet of code to help with that.

Code Lab » Blog Archive » inArray Method for JavaScript and ActionScript

This method (prototype) provides simple linear search capabilities for the built-in array class of JavaScript and ActionScript (ECMAScript compatible). It will return true or false depending upon whether the value passed as an argument to the method is found within the array object.

powered by performancing firefox

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: