Hi, first of all sorry for my english U_U and for my very noob questions
I made a very simple app in android, for calculate role dices >>
https://play.google.com/store/apps/details?id=com.bebop.letsroll and now I want to make it with Gideros for in a future add effects and dice movement
this is my mockup for now in GiderosPlayer >>
http://img507.imageshack.us/img507/4599/letsrolltest.pngthe dice buttons are a independent buttons, and + and - are a made with hieritachy example of GiderosStudio
the question: I need a listener for each button? or can made a global that cach the value of "clicked" button?
i want to change the value "0" of each dice and calculate the result
for now i use this for each button:
d4:addEventListener("click",
function()
numtxt = "d4"
resultat = math.floor(math.random()*4)+1
label:setText("Resultat " .. numtxt .. resultat)
end)
thank you very much
Comments
Here you have 2 alternatives i guess.
1-Mouseclick event for each button.
2-One mouse down event for the stage or for your main sprite class and do a hit test control for each of your buttons like.
@tails and @petec I'll work on that