Button release problem

How do I detect the release event on button if the button is pressed and held down and then the finger is moved else where on the screen ?

I can see the button is being released when the finger is moved but my release event is not firing.

I have multiple buttons on screen and use MultiTouch, so don’t think I can use SetFocus.

Dave [import]uid: 117617 topic_id: 29695 reply_id: 329695[/import]

Hi,

 if event.phase == "release" then  
 print( "You released a button!" )  
 end  

doesn’t work ? [import]uid: 18246 topic_id: 29695 reply_id: 119189[/import]

Not if they move the finger away from the button with out lifting it. That event never fires.

If they press and release while still on the button, everything works fine.

EDIT: If I use ui.lua and comment out lines 85 and 92 -

85: if isWithinBounds then
92: end

Then it all works fine as it’s no longer checking if the release was within the bounds of the button. Just testing on a device now to make sure this doesn’t effect anything else.

Dave [import]uid: 117617 topic_id: 29695 reply_id: 119190[/import]