[MX] goto another scene pb

Hi there,
I’d need a little bit of help here…
i have 3 scenes: loading, menu and animation.
when i’m playing the animation scene, i have a slider. I wanna use it as a on/off switch to go back to my scene “menu” so it goes like that:

the bouton (instance “onoff”) of my slider (on root of “animation”):
on (press) {
startDrag("_root.onoff", false, 50, 335, 120, 335);
}
on (release) {
stopDrag();
}

i have a movie clip also on root of “animation” that does a small loop between its frames 1 and 2 and i added the script:
z = _root.onoff._x;
if (z<60){
gotoAndPlay(“menu”,1);
}

frame 2 of that MC is just gotoAndPlay(1);

That doesn’t work. BUT if i try to control a MC with that code (instead of doing a jump to another scene), it works:

z = _root.onoff._x;
if (z<60){
_root.testmovieclip.gotoAndStop(2);
}

So my question is, why can it control a MC and not jump to a scene??

I hope someone will understand my pb :slight_smile:

TiA

Since you wrote the following code INSIDE a movieclip:
if (z<60){
gotoAndPlay(“menu”,1);
}

It will try and gotoAndPlay a scene named “menu”, frame 1, from WITHIN the movieclip, and since there are no scenes in movieclips, Flash just won’t do anything, or will return an error.

You gotto understand that flash is built in “Tree” method, ie:

root
+movieclip
++symbolinsidemc
+anothermc

See that root is the mainstage, movieclip and anothermc are two symbols on the mainstage, and symbolinsidemc is another symbol inside the first movieclip, which is on the mainstage. Am I babbeling? :crazy:

what flatline meant to say is that you use [color=red]_root.gotoAndPlay (“menu”,1)[/color]

but for some strange reason if the script is in a mc inside another mc … it won’t work
you’ll need to use a frame label like this [color=red]_root.gotoAndPlay (“frameLabel”)[/color]

here’s the ‘tree’ :stuck_out_tongue:

_root

  • movie clip [color=red]_root.gotoAndPlay (“menu”, 1)[/color]
    ++ movie clip inside movie clip [color=red]_root.gotoAndPlay (“frameLabel”)[/color]
  • another mc [color=red]_root.gotoAndPlau (“menu”, 1)[/color]

might want to see
http://www.kirupaforum.com/showthread.php?s=&threadid=10784&

[edit] which tells you pretty much what kax just put :wink:

are you belittling me senocular ?? am i belittling flatline ?? :stuck_out_tongue:
am i spamming ? :sure:

What the hell is this?? Belitteling day?!?! :stunned:

*Originally posted by FLATLINE *
**What the hell is this?? Belitteling day?!?! :stunned: **

kinda …
http://www.kirupaforum.com/showthread.php?s=&threadid=14530

I already read that thread, that’s why I asked that question. :wink:

Hey do you like my smiley? (look near my sig)

i can’t see it :-\

Here:

Did it myself.:smirk:

nope … :*(

maybe your server is down

ok it works, thanks for your replies and explanations, very much apreciated :slight_smile:

anytime :slight_smile:

but i still can’t see the smilie !! :frowning:
oh well … i’ll check again later :wink:

I can see it perfectly! What is wrong?

Try viewing this: http://planet.nana.co.il/uachq/flatsmiley.gif

lol … nope !! :-\

could you attach the smilie? :slight_smile:

LOL What the hell is going on?!?! :hangover:

lol :stuck_out_tongue: that’s pretty cool !!

it looks like frankestein [size=1][ it that right ?? i don’t remember if that’s the name ][/size] with eye glasses … :crazy:

actualy it was supposed to be me… :cool:

oops … :stuck_out_tongue:

sorry … :-\

now that i think about it … hey !! it looks just like you :stuck_out_tongue:

lol :trout: