Adobe Animate CC JavaScript Code Causing Double Clicking In Mobile
Copy link to clipboard
Copied
I was told to place this code into Adobe Animate in order to allow mousedown and clicks to work for mobile:
// Enable touch events while allowing the touch events to bubble up to the document.
createjs.Touch.enable( stage, false, true );
// Don't let the stage to automatically prevent default touch events.
stage.preventSelection = false;
This is a sample event listener:
this.HoldChBx.addEventListener("click", CheckBoxClickHandler.bind(this,"Hold"));
The problem is that when I press a button in mobile, it actually double clicks. For example, I have a checkbox. I click for the check to show, but then another click happens again automatically to make the check go away. I don't know why this is happening. I don't have this problem when I try it on my desktop using a mouse. This is bizarre.
I am need stage.preventSelection = false so that the user can still zoom in and out using pinch.
Copy link to clipboard
Copied
use a mousedown event.
Copy link to clipboard
Copied
The problem is that if the user doesn't press down long enough, it has the same issue as using a click event. For example:
this.SelectHold.addEventListener("mousedown", Button_MouseDown.bind(this));
this.SelectHold.addEventListener("pressup", Button_MouseUp.bind(this));
If I press the mouse down and then release quickly, then it reacts the same way as the click event, as if I clicked twice.
Copy link to clipboard
Copied
i don't see a problem, test1_Canvas
Copy link to clipboard
Copied
I can't use my fingers to zoom in or out on mobile using your example.

