How to make a button inside a movie clip to go to a another scene?

october 25th ,2002

I have a button inside the time line of a movie clip ;
that movie clip is placed onto the time line of scene 2;
I have tried to make that button to get back to a previous
scene with different actions haven´t worked as below :

1- (jazz gallery is the name of that previous scene)

on (release) {
gotoAndPlay ("_root.jazz gallery", 1);
}

2- I issued this label , jazz_gallery1 , at the scene I want to go

on (release) {
gotoAndPlay ("_root.jazz gallery", “jazz_gallery1”);
}

3-

on (release) {
gotoAndPlay ("_parent.jazz gallery", 1);
}

4-

on (release) {
_root.gotoAndPlay (“jazz gallery”, 1);
}

None of all above has worked !
Can someone please tell me what´s wrong ???
Thank you very much.
Cheers
MMKT

its not _root.jazz gallery… jaz gallery is not ON the root, but you can only get there THROUGH the root.

So in that case it would be something like…

_root.gotoAndPlay(“jazz gallery”)

Or something along those lines… you know the drill from there :slight_smile:

I hope this helps.

PS: how many scenes do you have?

PPS: loadMovie is preferred over scenes any day.

Hi lostinbeta

Tried :
on (release) {
_root.gotoAndPlay(“jazz gallery”);
}

… but it doesn´t work , nothing happens as I
click the button.

Thinking better I can see that jazz gallery is not on the root.
Feelling confused.
Thank you anyway

MMKT

Try using a frame label.

create a new layer. Create a blank keyframe at the beginning of the scene you want to goto. Select that frame, and in the “frame” panel, enter a frame label.

then the script would be something like

on(release){
_root.gotoAndPlay(“frameLabel”);
}

I don’t find that the scene names work well for gotoAndPlay statements. Frame labels seem to be much less quirky.

I was just going to post that after I experimented with it.

You beat me this time david :evil:

why the angry face? I love a good beating myself. :stuck_out_tongue:

AH… kinda kinky there david… I don’t swing like that :stuck_out_tongue:

Hello David Woodpecker

Eureka , now it does work ;

on (release) {
_root.gotoAndPlay(“jazz_gallery1”);
}

At first I had a problem but it was easy to realize
the missing semicolon ;
I keep having an output error at the debugging:

Target not found: Target="_root.maitre_reception" Base="_level0"

That´s strange because all seems to be working fine ;
any hint ?

Thank you very much once again

Cheers

MMKT

semicolons are vital to the end of lines in Flash. only a line ending in { or } may not have a semicolon. In almost all other circumstances they have to be there. They are the first thing I check when debugging, the second is “instance” names.

Glad I could help.

Glad someone called me the woodpecker. Now if anyone can tell me where the reference to the woodpecker comes from, I’ll personaly give them a kiss. (and LostinBeta… we all know that you swing that way… just come out of the closet… it’s ok. :P)

Woodpecker has some kinship with that pesky bird
of Walter Lanz cartoons?? lol
Don´t really know who is the evilest one , buggs bunny or
woodpecker ;
Hey you both Woodpecker and lostinbeta don´t quarrel
too much …
regards

MMkt

Nope… wrong pecker. The only hint I will provide is that my “location”, is the hint.

PS if you don’t bother to read anything except class asigned literature, don’t bother trying to figure it out… you’ll just hurt yourself.