Skip to main content
Participant
April 14, 2019
Question

TouchEvents no longer work

  • April 14, 2019
  • 1 reply
  • 387 views

Hello, just last night I was working on a project. All of my touchevent listeners were working and then they suddenly stopped. I have no clue why. I havn't changed a single thing. Here are some of the things I've tried to figure out where the problem is. This is on AIR for Android and I ran everything once as a debug on the computer, a debug on my phone, and regularly ran it with the Adobe SimController.

1. I created a completely fresh project with a single symbol. The symbol is just a green circle. Here is the code I put in the class file that runs at the start.

package  {

import flash.display.MovieClip;

import flash.events.*;

import flash.ui.Multitouch;

import flash.ui.MultitouchInputMode;

public class k extends MovieClip {

Multitouch.inputMode = MultitouchInputMode.GESTURE;

public function k() {

var btn:butn = new butn();

btn.addEventListener(TouchEvent.TOUCH_TAP, onTap);

addChild(btn);

}

function onTap(e:TouchEvent){

trace("tap");

}

}

}

The code does nothing for me. I then tried to attach an event listener to the stage that looks for taps. Nothing again. keep in mind I tested this with both the SimController and my smartphone.

2. I created a new project based off of the swipe gallery template. I did not change a single thing. The SimController does not work on the swipe gallery, but it does work when debugged on my phone.

3. I restarted both my phone and PC then tried the above two steps again. Nothing.

4. I uninstalled adobe animate on my desktop PC and reinstalled it. Still not working.

5. I went to my laptop that I use for college. I have not changed a single thing on this laptop. No touch events work on the laptop either. I get the same issues above on both laptop and desktop PC. I am at a loss for what to do.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
May 8, 2019

put a movieclip (background) on stage and retest.  any problem?