# Movie clip as button

**URL:** <https://forum.kirupa.com/t/movie-clip-as-button/6451>\
**Category:** Uncategorized\
**Created:** [October 7, 2002, 8:14pm UTC](https://forum.kirupa.com/t/movie-clip-as-button/6451 "2002-10-07T20:14:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![purpleproject](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@purpleproject](https://forum.kirupa.com/u/purpleproject)\
**Post date:** [October 7, 2002, 8:14pm UTC](https://forum.kirupa.com/t/movie-clip-as-button/6451/1 "2002-10-07T20:14:20Z")

</div>

Hi guys - I hope someone can help with this one.  
I have a movie clip inside my swf, that I am trying to script as a button. However, when I script it to go to frame 100 of my scene (for example)it goes to frame 100 of the movie clip, as opposed to the desired frame of the main movie.  
I’m sure its a simple problem, but i am well and truly stuck! Any help would be 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:** [October 7, 2002, 9:19pm UTC](https://forum.kirupa.com/t/movie-clip-as-button/6451/2 "2002-10-07T21:19:53Z")

</div>

Just use your movie clip as the button.

create your movie clip…

On your movieclip add these actions…

```auto
on (release){
gotoAndPlay(100);
}

```

MX allows for button events to be applied to a movie clip. I think that is a great improvement.

---

<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:** [October 7, 2002, 9:35pm UTC](https://forum.kirupa.com/t/movie-clip-as-button/6451/3 "2002-10-07T21:35:14Z")

</div>

Unfortunately, this is what I’m doing. But Flash is not ‘looking’ ouside of the movie clip. The scripting you suggested only takes the movie clip to frame 100, not the actual movie.  
Any other suggestions?

---

<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:** [October 7, 2002, 9:39pm UTC](https://forum.kirupa.com/t/movie-clip-as-button/6451/4 "2002-10-07T21:39:07Z")

</div>

Oops, my mistake…

```auto
on (release) {
	_root.gotoAndPlay(100);
}

```

I left out \_root.

---

<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:** [October 7, 2002, 10:05pm UTC](https://forum.kirupa.com/t/movie-clip-as-button/6451/5 "2002-10-07T22:05:06Z")

</div>

ahhh I see!  
nice one mate. That seems to have done the job!  
Cheers again mate!

---

<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:** [October 8, 2002, 12:01am UTC](https://forum.kirupa.com/t/movie-clip-as-button/6451/6 "2002-10-08T00:01:03Z")

</div>

No problem, I am glad I could help 🙂
