Tuesday, June 19, 2012

[Action Script] addChild in loop, recognizing objects June,2012

Hi i want to create dynamic menu using XML data, so i'm creating it like this
Code: for(i,..,...){
myButton = new iButton();
myButton.addEventListener(MouseEvent.MOUSE_DOWN, action);
menu.addChild(myButton);The problem is this makes every single button do the same thing, and i need them to be recognized somehow for example giving each button and id and pushing it into action as a paramenter or something, please help deadline is in ~10h or so .. ;d
addChild in loop, recognizing objects

Related Post



0 comments: