Copy link to clipboard
Copied
I want to create a simple drag & drop exercise, but on the iPad "drag & drop" is not working properly.
Here is the code:
var that = this;
createjs.Touch.enable(stage);
stage.enableMouseOver(10);
function initPage() {
var shape = new createjs.Shape();
shape.graphics.beginFill("#999999").drawRoundRect(100,100,140,60,8).endFill();
shape.on("mousedown", function(evt) {
this.alpha = 0.8;
this.offset = {x: this.x - evt.stageX, y: this.y - evt.stageY};
});
shape.on("pressmove", function(evt) {
this.x = evt.stageX + this.offset.x;
this.y = evt.stageY + this.offset.y;
});
shape.on("pressup", function(evt) {
this.alpha = 1;
});
that.addChild(shape);
}
initPage();
I can drag the shape, but the more I move it, the more it moves away from my finger. Here is a video I just recorded:
https://dl.dropboxusercontent.com/u/11697167/animatecc-bug.mp4
Any ideas what is wrong?
Edit:
Ok it seems the problem lies within the "makeResponsive" function which is part of the default HTML template.
Problem is, if I deactivate it the resolution on the Retina iPad is much worse (but drag & drop is working).
@Adobe, please release a bugfix asap
Have something to add?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now