Punkbutton not working properly?


(Aesir Games) #1

I’m using the Punkbutton ?plugin? to create my buttons, but when they are transported on Android you have to touch it twice to work, is like one touch “sets the cursor” on top of it and another is the click. How can i fix it?


(Ultima2876) #2

PunkUI wasn’t designed with touch devices in mind; we had problems with quite a few games that use PunkUI so we created an alternative version of it. I don’t know how compatible this is with regular FlashPunk (it was designed with Stage3DPunk in mind - it should theoretically be fully compatible though) and I’m not even 100% sure how well it deals with the exact problem you’re having (it was created a while ago and I can’t remember all of the exact changes that were made) - but give it a go and see how it goes!

Please be sure to test this in a copy of your project first, as it doesn’t come with any guarantees!


(FNX) #3

Since on device there isn’t any rollover, remove the rollover stuff from the class and let it just handle the click/tap. I hope this helps! :smiley:


(Aesir Games) #4

How? I’m kinda a begginer! hahaha


(Aesir Games) #5

Okay, i tried to bind the function to the event of “mouse entering on button” it kinda worked, but once i come back on the same screen, the cursor is still on the same spot, so it triggers the event again.

There’s a way to make the pointer set 0,0 or something like that?