Simple question but I don't know

Guys, what is the script in a button which resides in a movie clip, to go to the next scene. I feel like I’ve tried everything but nothing seems to work. thanks in advance! JesseH

Hi there :slight_smile:

on(release){
gotoAndPlay(“Scene_name”,1);
}

This should work.

Nope that was the first thing I tried, remember the button is in a movie clip, so I’m thinking the code has to be _root.
then somthing, or the button will think your telling it to do something in the Movie Clip it is in. anyone??? HELP

Hi,

U can allways send it to the last frame of Scene1, when it runs out of frames it goes to the next scene

on(release){
_root.gotoAndPlay(59);
}

this is if ur movie is 58 frames long.

cheers

SHO

Ps.:Why do people use scenes?

I tried that to, this does not work because the button is in a movie clip, do a quick test,

open up a new file in flash and make two scenes, scene 1 and scene 2 make sure both scenes have stop actions in the first frames.

then make a button in scene 1,

then convert that button into a movie clip.

ok now the button is inside a movie clip, … Now tell the button to
go to scene two.

I use scenes so I don’t have one humongos timeline and its much cleaner to work with.

Thanks again! JesseH

P.S let me know if you can make it go to scene 2 with the test above. Peace

Hi,

It works in my test!

Bye

SHO

Dunno why youre having a prob with that, what you said you did sould work.

PS the best way to clean up your timeline and make your project easy to work on is to make seperate swfs and use loadMovie command instead of scenes :stuck_out_tongue:

Peace

Hi,

Here my example where it works

Cheers

SHO

Have you tried

on (release) {
nextScene();
}

Thanks guys, I really appreciate the help, I figured it out yesterday, and the way I did it is pretty close to eki’s…I took the button it the movie clip and put this code on it…

on (release) {
tellTarget (_root) {
gotoAndPlay(“Scene 12”, “label”);
}
}

it works this way and goes to a label on the next scene…

eki yours works too, but you sent me the fla after I figured it out my way above. thanks again!!!

p.s Flex I did try that, it doesn’t work on a button in a movie clip going to the snext scene…thanks though!

Yes - had the same discussion with lostinbeta - I use it for going to the next scene from a button - but it doesn’t work from an mc. Only works from the main time line.

Cheers, glad u figured out=)