I'm trying to build an array code and have forgotten how to do this...this code is supposed to change the colour of 10 items (portfolio1 through portfolio10) ... could someone please tell me why this isn't working :
the trace return is right ...Code:my_array=new Array(); for(i=0; i<10; i++) { my_array [i] = (i + 1); var whatIsIt = "_root.sectionButton2.portfolio"+my_array[i]; trace(whatIsIt); whatIsIt.colorTo(0xFF9F00, 1);; }
_root.sectionButton2.portfolio1
_root.sectionButton2.portfolio2.....
_root.sectionButton2.portfolio10
Thanks!




...this code is supposed to change the colour of 10 items (portfolio1 through portfolio10) ... could someone please tell me why this isn't working :
Reply With Quote