# Movie clip object + gotoAndStop

**URL:** https://forum.kirupa.com/t/movie-clip-object-gotoandstop/263122
**Category:** flash
**Created:** [June 12, 2008, 7:00pm UTC](https://forum.kirupa.com/t/movie-clip-object-gotoandstop/263122 "2008-06-12T19:00:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![thosecars82](https://avatars.discourse-cdn.com/v4/letter/t/85f322/32.png) [@thosecars82](https://forum.kirupa.com/u/thosecars82)
#### Post date: [June 12, 2008, 7:00pm UTC](https://forum.kirupa.com/t/movie-clip-object-gotoandstop/263122/1 "2008-06-12T19:00:31Z")

</div>

Hello there  
I am stuck with a really silly example. I did this:

1. I put a Button on the stage.
2. I convert this Button into a Movie Clip.
3. I link this MovieClip to a Class like this:

import mx.controls.Button;  
import mx.utils.Delegate;  
class Caca{  
var b1:Button;  
function onLoad(){  
b1.addEventListener(“click”, Delegate.create(this,b1\_onClick));  
}  
public function b1\_onClick()  
{  
b1.\_parent.gotoAndStop(“open”);  
trace(“HELLO”);  
}  
}

1. I click twice inside the Movie Clip which I just created to go inside of this movie clip for the next steps.

2. I add a keyframe in the frame number 10.

3. I draw a circle on the stage inside of frame number 10 right besides the button.

4. I put “open” as the frame label for frame number 10.

5. I put stop() in the actions corresponding to frame number 1 and 10.

When I test the application, I can see the Message “HELLO”, but I cannot see the circle I drew. That is to say, the gotoAndStop is not working to modify the current frame in the timeline of the movieclip as I expected. Does anyone know how to solve this?  
What I do know is that if I replace b1.\_parent.gotoAndStop(“open”) with  
gotoAndStop(“open”), the effect is that the frame of the main timeline gets modified. Nonetheless, that is not the effect I am looking for. What I want, is changing the frame in the timeline associated with the movieclip.  
Thanks in advance
