# Button.gotoAndStop()

**URL:** <https://forum.kirupa.com/t/button-gotoandstop/9826>\
**Category:** flash\
**Created:** [December 19, 2002, 6:23am UTC](https://forum.kirupa.com/t/button-gotoandstop/9826 "2002-12-19T06:23:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![waffe](https://avatars.discourse-cdn.com/v4/letter/w/c37758/32.png) [@waffe](https://forum.kirupa.com/u/waffe)\
**Post date:** [December 19, 2002, 6:23am UTC](https://forum.kirupa.com/t/button-gotoandstop/9826/1 "2002-12-19T06:23:19Z")

</div>

Can you tell a button to gotoAndStop(2),or in other words gotoAndStop(over)?

It would be like you made a button a movie clip and had a command that told the movie clip to gotoAndStop(2).

---

<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:** [December 19, 2002, 6:28am UTC](https://forum.kirupa.com/t/button-gotoandstop/9826/2 "2002-12-19T06:28:36Z")

</div>

You might be able to do something like instance.gotoAndStop(2)… not quite sure. What about just making the button a movie clip? You can get the same amount of options just like a button can.

-brad-:evil:

---

<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:** [December 19, 2002, 6:37am UTC](https://forum.kirupa.com/t/button-gotoandstop/9826/3 "2002-12-19T06:37:27Z")

</div>

Ya I can, but right now that would require a lot of button changes to do what I want to do.

---

<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:** [December 19, 2002, 2:43pm UTC](https://forum.kirupa.com/t/button-gotoandstop/9826/4 "2002-12-19T14:43:28Z")

</div>

I don’t know. Did you try it? And why would you need to do that?

---

<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:** [December 20, 2002, 3:37am UTC](https://forum.kirupa.com/t/button-gotoandstop/9826/5 "2002-12-20T03:37:15Z")

</div>

It does not work. My concept is this, when click a button it stays on the second frame of the button, this will show that is the last button you hit. It will look different than the rest of the button until I hit another button.

---

<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:** [December 20, 2002, 10:05am UTC](https://forum.kirupa.com/t/button-gotoandstop/9826/6 "2002-12-20T10:05:28Z")

</div>

To my knowledge you need to put the button in it’s own movie and create two frames - one for the button and one for an instance of the button as a graphic. Then you can tell the movie to gotoandstop.

(note in the documentation - gotoandstop is a method of movies and not one of buttons!)

---

<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:** [December 20, 2002, 10:07pm UTC](https://forum.kirupa.com/t/button-gotoandstop/9826/7 "2002-12-20T22:07:18Z")

</div>

Would be a nice option if you could! 😛

---

<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:** [December 20, 2002, 11:10pm UTC](https://forum.kirupa.com/t/button-gotoandstop/9826/8 "2002-12-20T23:10:05Z")

</div>

Even if you set all buttons to inherit the methods of the MovieClip object, it won’t work. I don’t think Button object frames are recognized the same way MovieClip object frames are. Or maybe the fact that you aren’t hovering over the button ovverrides the goto method and takes the button right back to frame 1. Your best bet is to take tknapp’s suggestion.

-Al

---

<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:** [December 23, 2002, 5:47pm UTC](https://forum.kirupa.com/t/button-gotoandstop/9826/9 "2002-12-23T17:47:39Z")

</div>

WHen i had to indicate when button was clicked last i either use a movie clip as a button… or if i already have all the buttons … then i make a movie clip with the clicked state, give it an instance name and then use

on(press){  
pressmc.\_x = 40;  
}

same for \_y if u need to… 40 is the location where hte button is placed.

I used that method in this  
[http://prettypolly.thedatacorp.com/](http://prettypolly.thedatacorp.com/)  
on the ENTER TO WIN form…  
thats what i would do if u dont want to redo the buttons as MC’s

jakub
