A couple of problems with this code:
1: "stagemousemove" doesn't work after preventDefault is called
2: I have to tap an Android device fairly hard to trigger the "stagemousedown"
function preventDefault(e) {
e.preventDefault();
}
function disableScroll() {
window.addEventListener('touchmove', preventDefault, false);
}
stage.addEventListener("stagemousedown", down.bind(this));
function down(e){
disableScroll();
}
stage.addEventListener("stagemousemove", move.bind(this));
function move(e){
console.log(e.stageX / stage.scaleX); // not working after disableScroll function called
}
Anyone have any idea how to fix this?