Can I call gotoPlay from _level2 for _level0?

I have an swf loaded into _level0. On button release I want gotoAndPlay a certain frame label in an swf loaded into an MC named Host on _level0 to.

I have the following:

on (release) {
_level0.host.gotoAndPlay(“Main”, “MainStart”);
unloadMovieNum (2);
}

The unload part looks fine, and I am back to my orginal page. But the page did not jump to ‘MainStart’.

What am I forgetting?

RR

HI there mate,

i’m just looking at the code, and i may be getting the wrong end of the stick here… but why do you have “MAIN” And “MAINSTART” within the gotoAndPlay command ?

see, i’m thinking that either “main” OR “mainStart” is the name of the loaded MC (i could obviously be wrong… so if i assume that MAIN is the name of the MC and that “MainStart” is the frameLabel …then the code should be

(MY CODE)
on (release) {
_level0.host.MAIN.gotoAndPlay(“MainStart”);
unloadMovieNum (2);
}

(YOUR CODE)
on (release) {
_level0.host.gotoAndPlay(“Main”, “MainStart”);
unloadMovieNum (2);
}

this is just me taking a stab at it, and trying to understand what you’ve done ?

Cheers

Ket

ps: where are you loading the SWF from? (that is, it is definately loaded before all this code runs ?.. AND you might want to try and use _root instead of _level0 (i remember, for some reason a MC of mine went tits up…for what in reality, was no reason at all ?..)

which movie are you unloading? Are you unloading the same movie you tried to play? If you are, the command to unload it follows immediately after you call for the movie to play, hence, you would not see anything because the movie has not had enough time to play.

that was purely a stab in the dark, for I don’t know what you’re trying to unload in your command.

yeah, you may want to place the unload action on the last frame of the loaded movie, so that it actually plays the whole way through ?..

OR you could be a bit sly and place a variable on _root which is true (initially) then in the code in the loaded MC …last frame… you tell it to change the variable to FLASE…

and then place an IF statement in the first frame of the loaded movie… checking the status of the variable…

if variable “true” - play the movie
if variable “false” unload move

that way you’re able to resuse the MC without having to Unload it each time … (i’m not sure if this MC is gonna be used once and so placing an unload command is no problem OR if it may be used later… and you don’t want the MC Unload automatically ? )

Cheers

Ket

Main is the scene label of the swf sitting on level0.