How to make object jump to cursor/touch position on mousedown?
Hello, based on the createjs drag and drop demo, I'm trying to make it so that the circle jumps to the position of the cursor/touch on mousedown.
I managed to make the dragging work, but no idea how to make the circle jump to position.
createjs.Touch.enable(stage);
this.circle_mc.on("pressmove", function (evt) {
var point = stage.globalToLocal(evt.stageX, evt.stageY)
evt.currentTarget.x = point.x;
evt.currentTarget.y = point.y;
stage.update();
});
Can anyone help it do something like this?
