Copy link to clipboard
Copied
His code is for an HTML5 Canvas document, which of course won't work in an AS3 document. No idea why he posted it.
On properly functioning touchscreen devices, you shouldn't even need to mess with the TouchEvent class for something as simple as clicking buttons, since the touchscreen driver should be presenting touch events to the operating system as simulated mouse events.
Copy link to clipboard
Copied
Hi
add this code...
if(createjs.Touch.isSupported()){
createjs.Touch.enable(stage, true, true);
}
example:
if(createjs.Touch.isSupported()){
createjs.Touch.enable(stage, true, true);
}
myMc = this;
function gotoNextFrm(){
myMc.gotoAndPlay("frameNumber");
}
myBtn.addEventListener("click",gotoNextFrm);
Copy link to clipboard
Copied
Hello!
Thanks for the reply, but unfortunately I find out the code: "if (createjs.Touch.isSupported ()) {
createjs.Touch.enable (stage, true, true);
} "
contains 2 errors
"access to undefined property create.js".
Regards
Eve
Copy link to clipboard
Copied
His code is for an HTML5 Canvas document, which of course won't work in an AS3 document. No idea why he posted it.
On properly functioning touchscreen devices, you shouldn't even need to mess with the TouchEvent class for something as simple as clicking buttons, since the touchscreen driver should be presenting touch events to the operating system as simulated mouse events.
Copy link to clipboard
Copied
Thank you very much for your answer. The code is correct:
button_2.addEventListener (MouseEvent.MOUSE_DOWN, fl_ClickToGoToAndPlayFromFrame);
function fl_ClickToGoToAndPlayFromFrame (event: MouseEvent): void {
gotoAndPlay (3);
}
?
I still have a problem playing the contents of the frames.
After pressing the button the appropriate frame is displayed. There is a movie clip with animation on it - unfortunately the animation no longer plays, it stops on the first frame of the mc. The problem is only with the touch screen.
Regards!
Eve