# Problem with the actionscripting of a button within a movie clip

**URL:** <https://forum.kirupa.com/t/problem-with-the-actionscripting-of-a-button-within-a-movie-clip/321299>\
**Category:** flash\
**Created:** [April 15, 2011, 5:53pm UTC](https://forum.kirupa.com/t/problem-with-the-actionscripting-of-a-button-within-a-movie-clip/321299 "2011-04-15T17:53:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michelle\_E](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@Michelle\_E](https://forum.kirupa.com/u/Michelle_E)\
**Post date:** [April 15, 2011, 5:53pm UTC](https://forum.kirupa.com/t/problem-with-the-actionscripting-of-a-button-within-a-movie-clip/321299/1 "2011-04-15T17:53:25Z")

</div>

I have created a simple movie clip with an instance name of “MOVIE”. The movie clip contains a 2 stage tween. I have also labelled the frames of my movie clip. The first label is called “SHOW” and the tween goes from an alpha of 0% to 100%. The next label is called “HIDE” and the tween goes from an alpha of 100% back to 0%. I have a button on the stage in Scene 1. When I click this button, the movie clip plays - but only the frames labelled “SHOW”. I have embedded another button within my movie clip. This button is called “close”. I want this button to play the frames of the movie clip labelled “HIDE”. Except this “close” button does not work. I think I have to use “\_root” but I am not sure exactly how to phrase the actionscripting.

The actionscripting that I have used for the buttons are as follows.

The button on the stage in Scene 1:  
[COLOR=blue]on (press) {  
tellTarget (“MOVIE”) {  
gotoAndPlay(“SHOW”);  
}  
}[/COLOR]  
[COLOR=#0000ff][/COLOR]  
[COLOR=black]The button contained within the movie clip:[/COLOR]  
[COLOR=blue]on (press) {  
tellTarget (“MOVIE”) {  
gotoAndPlay(“HIDE”);  
}  
}[/COLOR]
