PDA

View Full Version : remove element from array ?



zezo
June 1st, 2004, 01:14 PM
hi

How can i remove the element from array in actionscript?
i have this array:
myArray = new Array ("1","2", "3", "4", "5");
i want to remove the element "3" when i press button. :-/

:moustache

kode
June 1st, 2004, 01:44 PM
Use the Array.splice() method. Look it up in the AS Dictionary. ;)

zezo
June 1st, 2004, 03:58 PM
thanks it works :)

kode
June 1st, 2004, 04:46 PM
No problem. :P