samedi 1 avril 2017

Multiple button, multiple function, mutiple value flash as3

I want to make multiple button function with this function

for(var i=1; i <= 3; i++){this["btn"+i].addEventListener(MouseEvent.CLICK, someFunction);}

then, every i clicked some button, i want it to trace some number that exactly same with [i]. Lets say i clicked 'btn1' then it trace '1'. What should i do? Thankyou. Beginner at flash.

Aucun commentaire:

Enregistrer un commentaire