Skip to main content
February 19, 2013
Answered

Button don't work on Android. Why ?!

  • February 19, 2013
  • 2 replies
  • 571 views

Hello,

I have create an event handler for a button with a name of sID_btn. it's work find on PC but it don't work on Android at all. What's the problem and how to fix it ?!

sID_btn.addEventListener(MouseEvent.CLICK, displayData);

function displayData(evt:MouseEvent):void

{

     for each (var grade:XML in xmlList)

     {

          if (myTextField.text == grade.st_id.text())

          {

               sName.text = grade.st_name;

               sQuran.text = grade.quran;

               sIslamic.text = grade.islamic;

               sArabic.text = grade.arabic;

               sEnglish.text = grade.english;

               sMath.text = grade.math;

               sSport.text = grade.sport;

               sComputer.text = grade.computer;

          }

     }

}

Regards,

This topic has been closed for replies.
Correct answer Nabren

You registered a MouseEvent.CLICK event for the event. This will work for Android as long as your Multitouch.inputMode is either MultitouchInputMode.NONE or MultitouchInputMode.GESTURE.

If your Multitouch.inputMode is MultitouchInputMode.TOUCH_POINT you will need to listen to the TouchEvent.TOUCH_TAP event instead. That would be the first thing to check.

2 replies

Nabren
NabrenCorrect answer
Inspiring
February 19, 2013

You registered a MouseEvent.CLICK event for the event. This will work for Android as long as your Multitouch.inputMode is either MultitouchInputMode.NONE or MultitouchInputMode.GESTURE.

If your Multitouch.inputMode is MultitouchInputMode.TOUCH_POINT you will need to listen to the TouchEvent.TOUCH_TAP event instead. That would be the first thing to check.

February 20, 2013

Thanks Nabren