if I have an array like this:
var myArra开发者_开发问答y:Array = ["apple","orange","strawberry"];
then I want to get the order number of the orange, which is 1, out. Is there any way to do that?
If you want the index of "orange" you could do this:
trace(myArray.indexOf("orange")); // returns 1
If you want to get a hold of data in a few different ways it might be worth using a dictionary object.
http://gskinner.com/blog/archives/2006/07/as3_dictionary_.html
Refer the following link, then will know about all feature of arrays.
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Array.html
精彩评论