Flash: Navigation between scenes

They have: 222 posts

Joined: Sep 1999

I'm trying to create a navigation bar in Flash to switch between 3 different scenes. I have a movie clip with four buttons inside it. The first three buttons link to different scenes, and the fourth goes to a webpage. The 4th button works, but none of the others do.

I've gotten a setup like this to work before; the only difference I can tell is that this time the buttons are inside a movie clip. Could that be the problem? If so, what can I do to fix it?

You can view the .swf and download the .fla here

Thanks Smiling

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

What you're going to have to do is tell it to go back to the parent scene and then switch scenes. Think of it like going up one level in a file directory. This is what works for my site's navigation:

on (release) {
    _parent.goto = "samples";
}
'

"Samples" being the scene I'ms sitching to. I guess you would do ("samples",1) if you wanted to send it to a particular frame in the "samples" scene

They have: 222 posts

Joined: Sep 1999

Thanks for your reply, but I tried that and it still doesn't do anything when you click the buttons. I updated the .fla and .swf on website if you need to look at it.

They have: 218 posts

Joined: Apr 2001

You need to use frame labels when targetting scenes from inside a MC on the main timeline. ie:

on (release) {
_parent.gotoAndStop("tour");
}

Place the appropriate frame labels on each scene, with the correct target, and it will work.

TonyMontana
ElectricMountain

They have: 222 posts

Joined: Sep 1999

I tried that too and that doesn't work either (I've updated the website if you want to see for yourself). Maybe _parent isn't the proper Location?

Also, can anyone tell me how to include a font in the .swf so that it will display properly even if the user doesn't have that font installed?

Thanks Smiling

They have: 218 posts

Joined: Apr 2001

You didn't use frame labels. Reiteration:

Place the appropriate frame labels on each scene, with the correct target, and it will work.

For more info on frame labels, check the actionscript dictionary.

And Flash will embed the font that you choose by default.

TonyMontana
ElectricMountain

They have: 222 posts

Joined: Sep 1999

Oh, that did work. I missed the part about them being frame labels instead of scene names the first time, sorry Smiling

I'm pretty sure it doesn't embed the font by default, though; I viewed that .swf @ work and it didn't display the font (Mickey), but it does @ home where I have the font installed. I'm using Flash 5 if that makes a difference.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.