Copy link to clipboard
Copied
Hi All,
I have gone through the post below and inmplemented "createjs.Touch.enable(stage);" code into my script but still it's not working in android mobile browser. Also when I click and hold then target object moves out of stage or somewhere far from cursor location. Is can anyone help me with code?
Related Post: https://community.adobe.com/t5/animate/publishing-html5-with-javascript-for-all-devices/m-p/10367066...
My code:
var stage = new createjs.Stage("myCanvas");
createjs.Touch.enable(stage);
this.square.on("pressmove",function(evt) {
evt.currentTarget.x = evt.stageX;
evt.currentTarget.y = evt.stageY;
});
Hi.
By default Animate already creates an instance of the Stage class called stage. Maybe this is what's causing the problem.
And to correctly apply a drag behavior without getting any offset, please watch this tutorial:
Regards,
JC
Copy link to clipboard
Copied
Hi.
By default Animate already creates an instance of the Stage class called stage. Maybe this is what's causing the problem.
And to correctly apply a drag behavior without getting any offset, please watch this tutorial:
Regards,
JC