# Gotoplay another scene on another level

**URL:** <https://forum.kirupa.com/t/gotoplay-another-scene-on-another-level/5627>\
**Category:** flash\
**Created:** [September 18, 2002, 12:22am UTC](https://forum.kirupa.com/t/gotoplay-another-scene-on-another-level/5627 "2002-09-18T00:22:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![3dron](https://avatars.discourse-cdn.com/v4/letter/3/2acd7d/32.png) [@3dron](https://forum.kirupa.com/u/3dron)\
**Post date:** [September 18, 2002, 12:22am UTC](https://forum.kirupa.com/t/gotoplay-another-scene-on-another-level/5627/1 "2002-09-18T00:22:58Z")

</div>

The main movie is load to a movie clip named host (on level0), by an earlier preloader.

On button hit my movie goes from it’s “Main” scene to “Scene2”.

In “Scene2” loadmovie loads scene2.swf to level2.  
Within this movie is an exit button. My button has the following code. But it doesn’t work right.

\_root.host.gotoAndPlay(“Main”, “MainStart”);  
unloadMovieNum(2);

The unload part works fine. It’s targeting a scene in another level which is my problem. I’ve tried  
\_level0.host.gotoAndPlay(“Main”, “MainStart”);  
as well.

Please help,

Ron

---

<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:** [September 18, 2002, 12:35am UTC](https://forum.kirupa.com/t/gotoplay-another-scene-on-another-level/5627/2 "2002-09-18T00:35:09Z")

</div>

If you have a button which is in a movie clip that’s loaded into level 2, and you wish to target the main time line of the orginal movie (ie Level 0) you would use for actions on the button:

[COLOR=blue]on (release) {  
\_level0.gotoAndPlay(“main”, “mainstart”);  
}[/COLOR]

You are using:

\_level0.host.gotoAndPlay.

This is targeting a movie clip called host in Level 0.

---

<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:** [September 18, 2002, 1:00am UTC](https://forum.kirupa.com/t/gotoplay-another-scene-on-another-level/5627/3 "2002-09-18T01:00:02Z")

</div>

But the timeline I am trying to access is in an MC nmaed host on level0.

so is \_level0.host.goto correct? why doesn’t it work?

Ron

---

<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:** [September 18, 2002, 6:27am UTC](https://forum.kirupa.com/t/gotoplay-another-scene-on-another-level/5627/4 "2002-09-18T06:27:45Z")

</div>

Hmm! This worked!

tellTarget ("\_level0.Host") {  
gotoAndPlay(“Main”, “MainStart”); }

so why didn’t \_level0.Host.gotoAndPlay(“Main”, “MainStart”);

Is it the wrong syntax?

Ron R

---

<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:** [September 18, 2002, 9:05am UTC](https://forum.kirupa.com/t/gotoplay-another-scene-on-another-level/5627/5 "2002-09-18T09:05:13Z")

</div>

Well essentially

tellTarget ("\_level0.host") {  
gotoAndPlay(“Main”, “MainStart”);  
}

and

\_level0.host.gotoAndPlay (“Main, MainStart”);

should both work the same. The only thing is, if you use Main, when the actual scene is main (lower case), Flash won’t go to main.

Also tellTarget has been phased out, so you should use gotoAndPlay.
