# Change frame on TOUCH\_BEGIN and TOUCH\_END

**URL:** https://forum.kirupa.com/t/change-frame-on-touch-begin-and-touch-end/332215
**Category:** flash
**Created:** [March 6, 2014, 4:59pm UTC](https://forum.kirupa.com/t/change-frame-on-touch-begin-and-touch-end/332215 "2014-03-06T16:59:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![o111](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/o111/32/2123_2.png) [@o111](https://forum.kirupa.com/u/o111)
#### Post date: [March 6, 2014, 4:59pm UTC](https://forum.kirupa.com/t/change-frame-on-touch-begin-and-touch-end/332215/1 "2014-03-06T16:59:21Z")

</div>

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:

```php

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.

```php

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?
