actionscript 3 - as3 looping MC from class not adding X propertity correctly -
i have simple loop creates movieclip class in library. it's adding first part of equation x property not plus 50. however, adding +50 first item in loop. doing wrong here?
var flagbutton:movieclip; function displayflagbuttons() { for( var = 0; pages.length > i; i++) { flagbutton = new roundbutton(); // line below giving me issues in adding 50 each movieclip flagbutton.x = (flagbutton.width * i) + 50; // again, above code adds 50 1st item addchild(flagbutton); } }
did mean :
flagbutton.x = (flagbutton.width + 50) * i;
Comments
Post a Comment