Skip to main content
Inspiring
April 13, 2012
Question

TouchEvents don't work in AIR3.3 ????

  • April 13, 2012
  • 1 reply
  • 370 views

I've been testing with MouseEvents so I can test on my computer.

Now that I'm almost done my app .. I've converted all MouseEvents to TouchEvents...  they arent working.. nothing happens when I touch the item.   Am I missing something here ?  This should be simple ?

Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

mainHomeBTN.addEventListener(TouchEvent.TOUCH_BEGIN, fl_mainHomeBTNdown);

function fl_mainHomeBTNdown(event:TouchEvent):void

{

 

trace("Touch Began");

}

mainHomeBTN.addEventListener(TouchEvent.TOUCH_END, fl_mainHomeBTNup);

function fl_mainHomeBTNup(event:TouchEvent):void

{

          trace("Button was tapped");

}

This topic has been closed for replies.

1 reply

Applauz78Author
Inspiring
April 13, 2012

Ok ...  so I found something interesting.

TouchEvents are not working from the root level of my app.

If I create a movieclip .. then put some buttons with TouchEvents on them inside that movieclip ..   they work fine.

Now the strange thing is ...  once the MovieClip that has the working TouchEvents in it is displayed and then closed...  at that point my root level touch events begin working.

Does anyone have any ideas how or why that would happen ?