actionscript 3 - How to Splice multi-dimensional arrays? -


there may simple way troubled me.

i'm trying splice 2-dimension array below :

removechild(test[1].splice(currshape, 1)); 

but won't splice it, , me following error :

type coercion failed: cannot convert []@29258d59 flash.display.displayobject. 

any helps appreciated.

your call splice() working. note splice() method returns array containing elements removed original array.

you pass array splice() returned argument removechild(). , removechild() method failing ... expects the argument displayobject not array, , throws exception.

you can change code following, written on 2 lines clarity:

var removeditems:array = test[1].splice(currshape, 1); removechild( removeditems[0] ); 

Comments

Popular posts from this blog

ruby on rails - Is it the correct way to implement belongs_to relation with factory girl? -

geolocation - Windows Phone 8 - Keeping background location tracking active beyond four hours -

Uncaught TypeError: Cannot read property 'parentNode' of null javascript -