Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

arraylist in flash action script 3

Is it possible to use an arraylist in action script 3? I want to perform simple operations such as add() and remove()?

Thanks

like image 373
user560571 Avatar asked Apr 20 '26 22:04

user560571


1 Answers

The default array primitive in AS3 is already an array list. You can use commands such as .push(object) and .pop() to add and remove to an array without defining its initial length.

Check out the Array reference here: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Array.html

If you want to use something similar to remove, use: myArray.splice(myArray.indexOf(object), 1);

like image 171
sharpper Avatar answered Apr 24 '26 05:04

sharpper