The problem is, I’m trying to splice a number out of an array and use it later as a number, but when attempting to do so flash always returns NaN.
Example:
myArray = new Array(1, 2, 3);
var myVariable = myArray.splice(0, 1);
trace(myVariable);
//returns 1
trace(myVariable+1);
//returns NaN
I’ve tried strict data typing everything, moving some stuff around, but with no luck. How can I set this up so that I can use myVariable as a number?
Just a quick note, I have no NaN problems when removing elements from my array using pop() or shift() and later using them as numbers.
Thanks.