Im making a game which relies on multidimensional arrays. But Im getting a serious problem which can be reproduced with this code (in the Flash 9 preview)
How can i get around this error? It's annoying because I actually want it to return undefined!Code:var test:Array = new Array() test.push(["a", "b"]) test.push(["c", "d"]) trace(test[0][0]) // a trace(test[1][0]) // c trace(test[0][-1]) // undefined (perfectly acceptable) trace(test[-1][0]) // throws error : "TypeError: Error #1010: A term is undefined and has no properties."




Reply With Quote