Hello,
I have a basic for loop to loop through buttons and set some stuff and onPress handlers:
for (i=1;i<=20;i++){
//do some stuff
_root["button"+i].onPress = function(){ someMC.gotoAndStop(i+1); }
}
However, as I noticed, all buttonsthen link to one and same frame - all point to last i
+ 1 - Is there any possibility to call gotoAndStop
with "static" Number
, so in next iteration, it won't change?
Edit: Ex. for last statement:
Iteration 5 will call gAS /*gotoAndStop:]*/(6);
Iteration 6 -> gAS(7);
Iteration 7 -> gAS(8);