# Button In MC... gotoAndPlay Help!

**URL:** <https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079>\
**Category:** Uncategorized\
**Created:** [December 23, 2002, 11:09pm UTC](https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079 "2002-12-23T23:09:33Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danno](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@Danno](https://forum.kirupa.com/u/Danno)\
**Post date:** [December 23, 2002, 11:09pm UTC](https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079/1 "2002-12-23T23:09:33Z")

</div>

I have a MC with the instance name “box” on my stage. Inside this movie clip I have a button with the instance name “button”.

This is the code I have on the button:

```php

on (release) {
	_parent.box.gotoAndPlay("blah");
}

```

On the main timeline, my MC (box) ends on frame 135. On frame 135, on an Actions Layer, I have a stop command. On frame 136, I have named it “blah” (minus quotes). When I click On the button, I just want it to go back to the main timeline and play frame 136 (named “blah”). I have looked on the searches, and applied almost every combination. I have looked in the manual and still cant find anything that works!

Please help!!! Thanks.

---

<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, 11:15pm UTC](https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079/2 "2002-12-23T23:15:12Z")

</div>

If the button is inside the movieclip “Box” you will just need…

```auto
on (release) {
_parent.gotoAndPlay("blah");
}

```

or

```auto
on (release) {
this.gotoAndPlay("blah");
}

```

---

<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, 11:31pm UTC](https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079/3 "2002-12-23T23:31:35Z")

</div>

Neither one worked , Lost!

I’m posting my .fla for ya … sorry if it is a little messy but lots goin on there!

---

<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, 11:33pm UTC](https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079/4 "2002-12-23T23:33:27Z")

</div>

I get an error saying “Failed to open document”.

I am using Flash MX.

Man, this is the second file today to fail to open (but the first one was an unexpected file format). At first I thought it was me, but then someone else says the same thing… so I have no clue.

Can you upload to your own server and link to it?

---

<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, 11:39pm UTC](https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079/5 "2002-12-23T23:39:09Z")

</div>

neither of those files is your problem lost … I got the same thing as you at both fla’s

---

<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, 11:41pm UTC](https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079/6 "2002-12-23T23:41:08Z")

</div>

Yeah and cookiemes file sent to my e-mail worked great.

---

<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, 11:42pm UTC](https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079/7 "2002-12-23T23:42:08Z")

</div>

could that be something with the forums?

---

<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, 11:42pm UTC](https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079/8 "2002-12-23T23:42:35Z")

</div>

Could be :-\

---

<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, 11:43pm UTC](https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079/9 "2002-12-23T23:43:27Z")

</div>

hmm … that’s not funny :-\

---

<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, 11:46pm UTC](https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079/10 "2002-12-23T23:46:15Z")

</div>

I was doing that anyways as a backup!

[http://www.users.qwest.net/~danno/Graphix.fla](http://www.users.qwest.net/~danno/Graphix.fla)

There ya go!

Thanks again for looking at it. I have to leave to go to work here in like 7 minutes, so heck, if it gets solved by then, YOU ROCK!

---

<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 24, 2002, 5:13am UTC](https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079/11 "2002-12-24T05:13:16Z")

</div>

Danno, I looked at your file and I’m a bit confused as to why you have 2 of the same buttons. Inside your “box” MC, you have a button called “button1” which is the “go to store” button and on your main timeline, you have another “go to store” button. You also placed a stop action on the first frame of your box MC so it never plays its timeline so I don’t see the purpose of the second “go to store” button inside “box” MC. If you place this action on the “go to store” button on the main timeline then it should work.

```php
on (release){
	gotoandPlay("blah");
}

```

If there wasn’t a stop action in “box” MC then it would allow the second “go to store” button to appear and if you have an action like this:

```php
on (release){
	_root.gotoandPlay("blah");
}

```

That would work, but since the button inside “box” MC never appears because of the stop action, that was probably the reason why you weren’t able to test it. Hope that helps. =)

---

<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 24, 2002, 8:02am UTC](https://forum.kirupa.com/t/button-in-mc-gotoandplay-help/10079/12 "2002-12-24T08:02:25Z")

</div>

Thanks,  
I got it to work now, i just had my code SO messed up that it was too disorganized. A little cleaning, and it all works great!  
Thanks again.
