我正在 Surface 上开发 AIR 应用程序原型,我注意到 TouchEvent.TOUCH_MOVE 没有按预期触发......
我已经构建了一个快速调试应用程序:
private var tf:TextField;
public function init():void{
trace("init");
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
tf = new TextField();
tf.multiline = true;
tf.width = 800;
tf.height = 2000;
this.stage.addChild(tf);
tf.text = "Test";
var touch:Sprite = new Sprite;
touch.graphics.beginFill(0xFFFF00,0.3);
touch.graphics.drawRect(0,0,800,200);
touch.graphics.endFill();
this.stage.addChild(touch);
touch.addEventListener(TouchEvent.TOUCH_BEGIN, updateTF);
touch.addEventListener(TouchEvent.TOUCH_END, updateTF);
touch.addEventListener(TouchEvent.TOUCH_MOVE, updateTF);
touch.addEventListener(TouchEvent.TOUCH_OVER, updateTF);
touch.addEventListener(TouchEvent.TOUCH_TAP, updateTF);
touch.addEventListener(TouchEvent.TOUCH_ROLL_OUT, updateTF);
touch.addEventListener(TouchEvent.TOUCH_ROLL_OVER, updateTF);
}
private function updateTF(event:TouchEvent):void
{
trace(event);
tf.appendText("\n event:" + event);
}
...它确认我没有触发 TouchEvent.TOUCH_MOVE。
可能是什么问题?谢谢