Actionscript 3 Search for string in array, propblem -


i have problem searching strings in array. want search 1 word , if exists, want trace position of string in array.

i believe should this:

if (myarray contains "11111111") {     trace("*position*") } else {     trace("cant find it"); } 

what kind of syntax using there , have checked documentation of array class? should first thing check always, there pretty straightforward method it:

var arr:array = ["1111", "2222", "3333"];  trace(arr.indexof("3333")); //traces index: 2 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -