AS3 Targetting
Having some real issues with some simple AS3 targetting.
I have three movie clips "mc1" mc2" and "mc3" inside a Movieclip called selector. This script appears in a Selector.as file attached to the outer movie.
var mcArray:Array=[mc1,mc2,23];
public function resetBtn(){
for(var i:Number=0;i<=2;i++){
//mcArray.gotoAndStop(bgNo);
trace("i = "+mcArray[0]+" ");
}
}
When I call the function resetBtn the mcArray trace comes back with i = NULL. If I change the mcArray values to numbers or strings this appears to work. Do I somehow need to tell the for loop that I am targetting a movieClip or change the array to specify that the mc names are movieClips?
