Hey
I am working on a project for the iPhone and I’m having a touch-issue. Basically I have 3 frames and I want to move between them using touch. What I mean is, when you’re at frame 1 and put your finger anywhere on the screen and hold it there, you move to frame 2. You will stay on frame 2 until you release your finger which will take you to frame 3. Makes sense?
I have figured out how to get from frame 1 to 2, but I can’t get the “release-finger-and-move-to-frame-3-thing” to work.
I am using a transparent movieclip (“sensor_mc”) as big as the stage as the “sensor” or button if you will. And here is the code I have in frame 1 that seems to work:
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
sensor_mc.addEventListener(TouchEvent.TOUCH_BEGIN, touchBegin);
function touchBegin(event:TouchEvent):void
{
gotoAndStop(2);
}
And this is the code I’m using on frame 2 that don’t work. Actually what happens is when you release your finger, it moves back to frame 1.
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
sensor_mc.addEventListener(TouchEvent.TOUCH_END, touchEnd);
function touchEnd(event:TouchEvent):void
{
gotoAndStop(3);
}
I really can’t figure this out, any ideas?