# Movie clip functions on entering frame

**URL:** <https://forum.kirupa.com/t/movie-clip-functions-on-entering-frame/260467>\
**Category:** flash\
**Created:** [May 15, 2008, 10:49pm UTC](https://forum.kirupa.com/t/movie-clip-functions-on-entering-frame/260467 "2008-05-15T22:49:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![setzer9999](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@setzer9999](https://forum.kirupa.com/u/setzer9999)\
**Post date:** [May 15, 2008, 10:49pm UTC](https://forum.kirupa.com/t/movie-clip-functions-on-entering-frame/260467/1 "2008-05-15T22:49:32Z")

</div>

Hello,

I have a movie clip I am trying to activate when the playhead gets to a specific frame.

I am confused because the code is working on one frame, but not another.

1. On frame 1, I have this code:

this.myMC.gotoAndPlay(myMC,“start”);

And this works just fine

1. On another frame I have the code:

this.myMC.gotoAndPlay(myMC,“out”);

But this does not work

1. I have also tried

onEnterFrame = function(){  
this.myMC.gotoAndPlay(myMC,“out”);  
}

But this also does not start the movie up at frame “out” either!

What am I missing? Why does it work on frame 1, but it does not work on subsequent frames?

---

<div class="post-metadata">

**Author:** ![joran420](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joran420/32/2329_2.png) [@joran420](https://forum.kirupa.com/u/joran420)\
**Post date:** [May 15, 2008, 11:01pm UTC](https://forum.kirupa.com/t/movie-clip-functions-on-entering-frame/260467/2 "2008-05-15T23:01:08Z")

</div>

this.myMC.gotoAndPlay(“out”);

^^MAYBE ^^

---

<div class="post-metadata">

**Author:** ![small\_guy](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@small\_guy](https://forum.kirupa.com/u/small_guy)\
**Post date:** [May 15, 2008, 11:07pm UTC](https://forum.kirupa.com/t/movie-clip-functions-on-entering-frame/260467/3 "2008-05-15T23:07:33Z")

</div>

Without actually seeing your fla (even though you’ve posted the code here…there could be other issues) it is a little hard to tell.

By this, I am suggesting this:

if your movie clip does not have a stop(); action at the start then it might just be automatically playing regardless of the code gotoAndPlay(my\_mc, “start”);

The other person’s observation probably has some merit to it because in terms of your parameters you should really only need either the (“start”) or the (“out”) directive.

Again, a little hard to tell without seeing the fla.

[QUOTE=joran420;2326899]this.myMC.gotoAndPlay(“out”);

^^MAYBE ^^[/QUOTE]

---

<div class="post-metadata">

**Author:** ![setzer9999](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@setzer9999](https://forum.kirupa.com/u/setzer9999)\
**Post date:** [May 15, 2008, 11:12pm UTC](https://forum.kirupa.com/t/movie-clip-functions-on-entering-frame/260467/4 "2008-05-15T23:12:25Z")

</div>

[QUOTE=small\_guy;2326901]Without actually seeing your fla (even though you’ve posted the code here…there could be other issues) it is a little hard to tell.

By this, I am suggesting this:

if your movie clip does not have a stop(); action at the start then it might just be automatically playing regardless of the code gotoAndPlay(my\_mc, “start”);

The other person’s observation probably has some merit to it because in terms of your parameters you should really only need either the (“start”) or the (“out”) directive.

Again, a little hard to tell without seeing the fla.[/QUOTE]

Thanks you two. It was because the myMC was a redundant element. It works now.
