disable touch when object is transitioning

Hi,

I have a display object that does a transition as below:

transition.to(playButton, { alpha = 1, y = display.contentHeight - 122, time=100})

It also has a touch listener. While it is in transition, I can also touch it. I wanna to disable to the touch until it finishing transitioning. Can someone share me the solution.

Thank you.

So Lin

Here’s a forum thread discussing methods to achieve this:

https://forums.coronalabs.com/topic/34832-how-to-disable-touch-if-object-is-in-transition/

Long story short, using a flag (per object or global flag for entire view) will allow you to control what can and cannot be interacted with.

Here’s a forum thread discussing methods to achieve this:

https://forums.coronalabs.com/topic/34832-how-to-disable-touch-if-object-is-in-transition/

Long story short, using a flag (per object or global flag for entire view) will allow you to control what can and cannot be interacted with.