I’ve looked in the documentation and found nothing. I’m in MX 2004 pro.
here’s my code:
var arrayName = "name";
trace(arrayName);
var numberofPics = arrayName.length;
trace("array length = " + numberofPics);
shifted = arrayName.shift();
trace("shifted = " + shifted);
arrayName.push(shifted);
trace("ordered pic is " + shifted);
RESULTS:
the ‘trace(arrayName)’ comes back correctly.
the ‘trace("array length = " + numberofPics)’ comes back correctly- which means that ‘var numberofPics = arrayName.length’ works correctly.
when it gets to the ‘trace("shifted = " + shifted)’ it comes back as "shifted = "
when it gets to the ‘trace("ordered pic is " + shifted)’ it comes back as "ordered pic is "
so is it just that a variable can’t be used as the name of an array when using shift and push?