# How to control ....with a frame action

**URL:** <https://forum.kirupa.com/t/how-to-control-with-a-frame-action/7071>\
**Category:** Uncategorized\
**Created:** [October 23, 2002, 5:34am UTC](https://forum.kirupa.com/t/how-to-control-with-a-frame-action/7071 "2002-10-23T05:34:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![multimediamkt](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@multimediamkt](https://forum.kirupa.com/u/multimediamkt)\
**Post date:** [October 23, 2002, 5:34am UTC](https://forum.kirupa.com/t/how-to-control-with-a-frame-action/7071/1 "2002-10-23T05:34:22Z")

</div>

I have the following situation : on scene1 there is a movie clip , instance name : “mc1” ;

“mc1” runs 300 frames and as the last is reached (300th one) I wish this frame controls the action and make it skip to next scene , which is scene 2 ;

I´ve tried that control line bellow -( issued at frame 300) - without result , because it performs a go to and play to the frame 1 of “mc1” and not to frame 1 of scene2 ;

gotoAndPlay (“scene2”, 1);  
stop ();

Testing the movie with control+shift+enter I can see on debugging screen something like \_level0.mc1 what makes me suspect on wrong pathing , despite I don´t know what is wrong.

Can someone give me a hint to make that stuff work ?

[COLOR=darkblue]navy blue[/COLOR] [FONT=arial]arial[/FONT]

---

<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 23, 2002, 5:38am UTC](https://forum.kirupa.com/t/how-to-control-with-a-frame-action/7071/2 "2002-10-23T05:38:02Z")

</div>

\_parent.nextScene()

Try that.

---

<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 23, 2002, 5:38am UTC](https://forum.kirupa.com/t/how-to-control-with-a-frame-action/7071/3 "2002-10-23T05:38:02Z")

</div>

Just to let you know, even when the addressing is correct, I can’t get my movies to goto scenes without using a framelabel. I suggest placing a frame label in the first frame of scene two and then using the following.

try

\_root.gotoAndPlay(“theFrameLabel”);

the \_root, tells the player that it’s directing the action to the main timeline. The frame label, tells it which frame on that timeline it should go to.

---

<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 23, 2002, 5:38am UTC](https://forum.kirupa.com/t/how-to-control-with-a-frame-action/7071/4 "2002-10-23T05:38:56Z")

</div>

Haha, beat you david 😛

Yeah, you can only change scenes on the main timeline.

That is why I first tell it to go to the \_parent (which in this case is the main timeline) and just use the nextScene() action.

Works great for 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:** [October 23, 2002, 5:40am UTC](https://forum.kirupa.com/t/how-to-control-with-a-frame-action/7071/5 "2002-10-23T05:40:47Z")

</div>

\*\*\*\* you LOB… that is a good option too. 🙂

I forgot to mention. The reason for this is simple. Commands given are understood by the player to be directed localy to whatever is calling them. So a gotoAndPlay(); method is directed towards the main timeline if it’s located on the main timeline, or it’s directed towards a movie clip if it’s either on that movie clips timeline, or attached to the movie clip, or attached to a button within a movie clip.

\_root directs attention to the main timeline from whereever you are.  
\_parent directs the attention to the timeline that contains the timeline which contains the code in question.

---

<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 23, 2002, 5:43am UTC](https://forum.kirupa.com/t/how-to-control-with-a-frame-action/7071/6 "2002-10-23T05:43:01Z")

</div>

And yet you outdo me once more 🙂

I love your explanations david.

Without them I think I would be lost (well, I am… but thats just my name)

---

<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 23, 2002, 5:55am UTC](https://forum.kirupa.com/t/how-to-control-with-a-frame-action/7071/7 "2002-10-23T05:55:55Z")

</div>

rofl. Thanks beta. Glad that I can always elaborate on something for yah. 🙂

---

<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 23, 2002, 5:58am UTC](https://forum.kirupa.com/t/how-to-control-with-a-frame-action/7071/8 "2002-10-23T05:58:47Z")

</div>

I am glad you can too.

Through better understanding you will have better understanding… right?

😛 :beam:

---

<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 24, 2002, 3:27am UTC](https://forum.kirupa.com/t/how-to-control-with-a-frame-action/7071/9 "2002-10-24T03:27:42Z")

</div>

The logical \_parent.nextScene() has not worked , what seems  
very illogical ;

I solved the problem by issuing \_root.gotoAndPlay(“skip\_scene”) on the frame of the movie clip ; on main timeline of scene I labeled a frame “skip\_scene” .  
…

---

<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 24, 2002, 3:56am UTC](https://forum.kirupa.com/t/how-to-control-with-a-frame-action/7071/10 "2002-10-24T03:56:21Z")

</div>

That is odd. It worked great for me.

Well at least you got it working:)
