flash - AS2 Accessing instance names in for loop with numbers at the end -
so right here code
var binaryarray:array = [ 1,0,0, 0,1,0, 0,0,1] for(i = 0; < binaryarray.length; i++){ if(binaryarray[i] == 1){ light + i.gotoandstop(2); } }
i have 9 movieclips on stage instances of light0, light1, light2, etc...
but can't seem work
assuming light0, light1, etc on stage need go:
this["light" + i.tostring()].gotoandstop(2);
Comments
Post a Comment