0
我正在尝试使用GESTURE_PAN移动MC,并且还使用MOUSE_CLICK转到另一个框架。 许多人都说GESTURE_PAN和MOUSE_CLICK一起工作,但他们不会在我的iPhone上。 我在网上阅读了许多Q & A,当然还有在stackoverflow上。ActionScript 3.0 TransformGestureEvent和MouseEvent
stop();
Multitouch.inputMode = MultitouchInputMode.GESTURE;
stage.addEventListener(TransformGestureEvent.GESTURE_PAN, onPan);
table.addEventListener(MouseEvent.CLICK, gotoBox);
function onPan(event: TransformGestureEvent): void
{
table.x += event.offsetX;
table.y += event.offsetY;
if (table.x > (table.width/2))
{
table.x = table.width/2;
}
if (table.x < stage.stageWidth - (table.width/2))
{
table.x = stage.stageWidth - (table.width/2)
}
if (table.y > (table.height/2))
{
table.y = table.height/2;
}
if (table.y < stage.stageHeight - (table.height/2))
{
table.y = stage.stageHeight - (table.height/2)
}
}
function gotoBox(e: MouseEvent)
{
trace("mouse")
}
事情是当我在Flash Pro CC模拟器上测试它一切正常,但不是在我的iDevice上。
帮忙,我没时间了!