MouseEvent and TouchEvent not working on HTC phones
Hi,
I am using both touchEvent and mouseEvent in my application.
TouchEvent for scrolling the screen and MouseEvent for link.
its working well on Galaxy series but not working on HTC phones.
here is the part of code:
img1.addEventListener(MouseEvent.CLICK, gzt1);
img2.addEventListener(MouseEvent.CLICK, gzt2);
img3.addEventListener(MouseEvent.CLICK, gzt3);
img4.addEventListener(MouseEvent.CLICK, gzt4);
img5.addEventListener(MouseEvent.CLICK, gzt5);
img6.addEventListener(MouseEvent.CLICK, gzt6);
stage.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
stage.addEventListener(TouchEvent.TOUCH_MOVE, onTouchMove);
stage.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);
function onTouchBegin(event:TouchEvent) {
// mySprite.mouseEnabled= false;
//mySprite.mouseChildren= false;
currenty = event.stageY;
}
function onTouchMove(event:TouchEvent) {
mySprite.mouseEnabled= false;
mySprite.mouseChildren= false;
if(event.stageY<currenty){
mySprite.y -=10;
}else if(event.stageY>currenty){
mySprite.y +=10;
}
}
function onTouchEnd(event:TouchEvent) {
mySprite.mouseEnabled= true;
mySprite.mouseChildren= true;
if(mySprite.y>0){
mySprite.y = 0;
}else if(mySprite.y<(newsy-(5*sx/3))){
mySprite.y = (newsy-(5*sx/3));
}
}
