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
Post a Comment