# Flash MX - GotoAndPlay - Problem

**URL:** https://forum.kirupa.com/t/flash-mx-gotoandplay-problem/11529
**Category:** flash
**Created:** [January 18, 2003, 5:47pm UTC](https://forum.kirupa.com/t/flash-mx-gotoandplay-problem/11529 "2003-01-18T17:47:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Merano](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@Merano](https://forum.kirupa.com/u/Merano)
#### Post date: [January 18, 2003, 5:47pm UTC](https://forum.kirupa.com/t/flash-mx-gotoandplay-problem/11529/1 "2003-01-18T17:47:14Z")

</div>

Hi Everybody!

I have a strange problem:

In my Document, I have a MC called Imagemov  
which contains 8 different images in 8 different frames.  
Each frame has a stop() in it.

If Button 2 in my document is being pressed, I want  
the MC Imagemov to be played in the 2nd frame…  
If Button 3 is being pressed, the 3rd frame…  
and so on…

so far, it all works properly…

But if you press one of the Buttons  
(for example Button 2) another time, the  
MC Imagemov jumps to frame 3 instead of replaying  
frame 2…

how come??? :q:

Voilà my Actionscript that I wrote into the  
Buttons: (That one is for Button 2 :nerd: )

on (release) {  
\_root.Imagemov.gotoandplay(2);  
}

Thanks a lot for your help :beam:

Cheers

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 18, 2003, 7:14pm UTC](https://forum.kirupa.com/t/flash-mx-gotoandplay-problem/11529/2 "2003-01-18T19:14:59Z")

</div>

Use gotoAndStop instead of gotoAndPlay 😉

You don’t want to play your timeline, you want to stop at the specific frame. If you use gotoAndPlay, it plays the frame you go to, but it reads the stop action as well. It registers the stop action as on, so when you do gotoAndPlay again it plays starts playing your movie again. You shouldn’t have that problem with gotoAndStop()

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 18, 2003, 7:47pm UTC](https://forum.kirupa.com/t/flash-mx-gotoandplay-problem/11529/3 "2003-01-18T19:47:29Z")

</div>

oh… upps… 😏

Well, one never thinks about the easiest way  
to solve a problem… 😉

Seems I just outed myself to be a total newbie =)

Thanx a lot for your help!

Hope you have a nice weekend

Cheers

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 18, 2003, 7:49pm UTC](https://forum.kirupa.com/t/flash-mx-gotoandplay-problem/11529/4 "2003-01-18T19:49:04Z")

</div>

No problem man. Sometimes the easiest solutions are also the easiest to overlook.

You have a nice weekend too 🙂
