【发布时间】:2012-08-03 16:25:27
【问题描述】:
我正在使用 Flash CS6(主要是)为 iOS 创建一个应用程序,但在让特定页面正常工作时遇到了一些问题。
布局如下:我的内容是舞台宽度的3倍的影片剪辑,实例名称为txtContent。
在单独的层上,我的动作脚本 (v3.0) 如下所示:
import com.greensock.*;
import flash.events.MouseEvent;
//Swipe
Multitouch.inputMode = MultitouchInputMode.GESTURE;
var currentTile:Number = 1;
var totalTiles:Number = 3;
txtContent.addEventListener(TransformGestureEvent.GESTURE_SWIPE , onSwipe);
function moveLeft():void{
txtContent.x += 640;
}
function moveRight():void{
txtContent.x -= 640;
}
function onSwipe (e:TransformGestureEvent):void{
if (e.offsetX == 1) {
if(currentTile > 1){
moveLeft()
currentTile--
} else {}
}
if (e.offsetX == -1) {
if(currentTile < totalTiles){
moveRight()
currentTile++
}
}
}
stop();
当我使用触摸层测试影片时,影片剪辑在每次滑动时都成功地左右移动,并且不会继续向任一方向移动太远,实际上忽略了任何其他滑动。
但是,当我编译 IPA 并在 iPhone 上测试时,只有前两个“磁贴”移动(滑动时我只能看到三分之二的影片剪辑),就像我滑动到第三个“磁贴”一样根本无法向后滑动。无论我做什么,它都会卡在第三部分。
我的代码中是否存在无法在 iOS 中正确注册的问题?
仅供参考,我正在 iPhone 3GS 上进行测试。
【问题讨论】:
标签: ios actionscript-3 flash actionscript flash-cs6