# \[MX\] Button inside Movie Clip

**URL:** <https://forum.kirupa.com/t/mx-button-inside-movie-clip/42325>\
**Category:** flash\
**Created:** [February 7, 2004, 9:57pm UTC](https://forum.kirupa.com/t/mx-button-inside-movie-clip/42325 "2004-02-07T21:57:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![DizainLand](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@DizainLand](https://forum.kirupa.com/u/DizainLand)\
**Post date:** [February 7, 2004, 9:57pm UTC](https://forum.kirupa.com/t/mx-button-inside-movie-clip/42325/1 "2004-02-07T21:57:39Z")

</div>

Hi every body

I made motion of movie clip iside it a button.  
the motion is like this:

from 1 to 10 then stop

when you click the button it tells the movie the contiue from 10 to 20

i attached this script to the button

[AS] on (release) {  
tellTarget ("/") {  
play();  
}  
}  
[/AS]

when i test the swf, it works great 🙂  
the problem is this swf is targeted to an Home swf  
so when i click that button, it plays the whole movies  
Home and the swf itself ☹

thanks for helping me

---

<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:** [February 7, 2004, 10:08pm UTC](https://forum.kirupa.com/t/mx-button-inside-movie-clip/42325/2 "2004-02-07T22:08:39Z")

</div>

Hey Dizain,

First off, do not use slash syntax; it’s been deprecated since Flash 5! 😛  
Just call the [font=courier new]play()[/font] function:

```auto
on (release) {
play();
}

```

---

<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:** [February 7, 2004, 10:13pm UTC](https://forum.kirupa.com/t/mx-button-inside-movie-clip/42325/3 "2004-02-07T22:13:28Z")

</div>

Hi kode, i was sure u will reply 🙂

but i tried this, it does not work.

remember, the button is inside the movie clip  
the movie clip plays on the main timeline.

so this code is if the movie and button on the same timeline.

is it clear 🙂

---

<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:** [February 7, 2004, 10:15pm UTC](https://forum.kirupa.com/t/mx-button-inside-movie-clip/42325/4 "2004-02-07T22:15:16Z")

</div>

Oh! Sorry… I thought that the animation was inside the movie clip too. 😛

```auto
on (release) {
_parent.play();
}

```

---

<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:** [February 7, 2004, 10:18pm UTC](https://forum.kirupa.com/t/mx-button-inside-movie-clip/42325/5 "2004-02-07T22:18:51Z")

</div>

Yes 🙂  
it works  
but  
can we tell it to play from frame 30?

thanks alot

---

<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:** [February 7, 2004, 10:20pm UTC](https://forum.kirupa.com/t/mx-button-inside-movie-clip/42325/6 "2004-02-07T22:20:00Z")

</div>

Sure! 😉

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

```

---

<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:** [February 7, 2004, 10:22pm UTC](https://forum.kirupa.com/t/mx-button-inside-movie-clip/42325/7 "2004-02-07T22:22:13Z")

</div>

Of course SURE 🙂

thanks alot 🙂

---

<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:** [February 7, 2004, 10:31pm UTC](https://forum.kirupa.com/t/mx-button-inside-movie-clip/42325/8 "2004-02-07T22:31:37Z")

</div>

You’re welcome, Dizain. 🙂
