Skip to main content
Participating Frequently
January 13, 2012
Question

How Can I Make TouchEvent.TOUCH_BEGIN work for a Slider?

  • January 13, 2012
  • 9 replies
  • 1411 views

Hi,

I'm building an application that has a slider. The slider works great using TOUCH_BEGIN, TOUCH_MOVE, and TOUCH_END events. The problem occurs when the user is touching anywhere else on the screen then uses another finger to move the slider at the same time. The slider will not function. The first touch is being detected by the parent of the parent of the slider.

I know it has something to do with a TOUCH_BEGIN event being registered by the first touch. But using evt.touchPointID and setting a touchMoveID value (as suggested in Adobe's docs) doesn't seem to have any affect. Also, setting mouseEnabled to false on the slider.parent.parent clip does not help which I really don't get at all.

Can anyone help me figure this out? Is there a way to ignore the other TOUCH_BEGIN event or a way to prevent it in the first place?

Many thanks!

This topic has been closed for replies.

9 replies

Colin Holgate
Inspiring
January 13, 2012

What happens if you do a trace of the IDs? Do you get a trace from the parent and the slider?

cmk7Author
Participating Frequently
January 13, 2012

Yes, I get IDs from both. The ID from the parent is causing a problem at TOUCH_MOVE because the IDs are different. When I'm not touching the screen, just the slider alone, the IDs are the same and the slider moves.

Thanks for the fast reply.

Colin Holgate
Inspiring
January 13, 2012

If you trace the ID on the move event, do you only see one ID? I mean, as you drag on the screen and on the slider?