Hi all,
I think this is quick question. Below is a function that I'm trying to get to push new values into an array. It works the first time but then returns an undefined thereafter.
code:
function dollyFunction(target) {
if (functionPass ==0 ) {
var sickBayArray:Array = new Array();
//trace(sickBayArray);
functionPass = 1;
}
var thisTarget:String = target;
trace(eval(thisTarget));
if (eval(thisTarget)._currentframe != 2) {
eval(thisTarget).gotoAndStop(2);
} else {
eval(thisTarget).gotoAndStop(1);
}
var pushVal:String = thisTarget.substring(0,2);
sickBayArray.push(pushVal);
trace("pushVal "+pushVal);
trace(thisTarget.substring(0,2));
trace("the array contains "+sickBayArray.toString());
}
Am I missing something here when using the push method?
Thanks heaps
ss




Reply With Quote