How to detect if button is being held down ?

I am using UI buttons (not the newer widget as it doesn’t support Multitouch). In my event am checking for press/release as normal but can I detect a “hold down” situation ?

The only way I can think of is having a variable and setting it in the “press” and “release” events and then in my EnterFrame event handler do whatever I need to if the variable is set.

I just hate having to much code in the EnterFrame function. But just wanted to check there is no other way of doing it.

Dave [import]uid: 117617 topic_id: 28797 reply_id: 328797[/import]

From my understanding, if you’re going to use the UI.lua library, “enterFrame” will be your best bet. To minimize overhead when it’s not in use, you can turn on and off your eventListener when you press and release the button.
[import]uid: 6084 topic_id: 28797 reply_id: 116029[/import]

I use EnterFrame for other stuff, just didn’t want to overload it. But if thats the only way.

Dave [import]uid: 117617 topic_id: 28797 reply_id: 116033[/import]