Flash: Navigation between scenes
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
Megan posted this at 02:25 — 13th May 2002.
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
Megan
Connect with us on Facebook!
IanD posted this at 10:43 — 13th May 2002.
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.
Fighting for a Lost Cause.net
TonyMontana posted this at 18:20 — 13th May 2002.
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
IanD posted this at 20:36 — 13th May 2002.
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
Fighting for a Lost Cause.net
TonyMontana posted this at 22:09 — 13th May 2002.
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
IanD posted this at 00:06 — 14th May 2002.
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
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.
Fighting for a Lost Cause.net
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.