View Full Version : Scene navigation
Flash69
02-17-2003, 09:35 PM
Hi everyone. My first post and already I need help!!
Ive trawled through 3 pages of a heck of a lot using 'Navigation' or 'scene navigation' in search and found 1 solution which unfortunately didnt work .
Im having problems navigating frome scene to scene (there will be 6 in total).
I have created a nav bar with 6 buttons as an _mc. Ive placed it on the title page (scene1) and created another scene called 'services'
Ive attached the following AS to the 'Services' button but it doesnt work! The relevant scene and frame labels are named correctly.
on (release) {
gotoAndStop("services", "start");
}
When the button is clicked it stays on the title page.
I cant see why it doesnt work, any ideas? And how best should I tackle jumping from scene 2 to 3 or 1 to 6 etc....?
Thanks in advance
CyanBlue
02-17-2003, 10:04 PM
Howdy... Welcome aboard... :)
Try this and see if it works...on (release)
{
_level0.gotoAndStop("start");
}And do yourself a favor and avoid using the scene if possible... Scene is there just for the layering... Nothing Else!!! You get to get into lots of problems if you use scene... Use frame label instead... :D
Billy T
02-17-2003, 10:07 PM
which timeline are you wanting to target? _root
so your action should be
on (release) {
_root.gotoAndStop("services", "start");
}
I'm sure you saw during your search that it is best not to use scenes. If you must, then make sure all the frame labels in every scene are unique and then just link to the frame label directly
eg
on (release) {
_root.gotoAndStop("services_start");
}
cheers
Billy T
02-17-2003, 10:07 PM
:D
Flash69
02-17-2003, 10:16 PM
Thanks for your help i'll try these out tomorrow
Paul
Flash69
02-17-2003, 10:30 PM
Couldnt wait 'till tomorrow!!! I had to call it a night on a positive note!
CyanBlue's 'level0' option works great.
Billy: I'd tried your _root idea and _parent, god knows why they dont work tho'!!
Maybe some kind soul could shed some light on this for me too, just so I can better understand the timeline relationships.
Thanks again
Billy T
02-17-2003, 10:38 PM
are you using loadMovie at all?
Flash69
02-17-2003, 10:45 PM
not so far and to be honest im not sure when i would use it without checking my books first
:confused: <- definately my state of mind at the moment!!!!
Why do u ask?
Billy T
02-17-2003, 10:56 PM
because once you have loaded a movie into a level then you should start refering to _root as _level0
me thinks it might be your frame labels or something else that stopped _root working...
anyway, if level0 is working then go with that
cheers
electronic ink
02-18-2003, 05:02 PM
This will work:
gotoAndPlay("/:nameoflabel")
And as Billy says do not duplicate your label names even if they are on another timeline
electronic ink
Flash69
02-18-2003, 07:34 PM
Thanks again
Ive taken your advice and binned the scenes. Ive got all the pages in a seperate scene on one layer (1-5 page 1, 6-10 page 2, etc). Seems to work fine.
(so far!!)
Sir Patroclo
02-19-2003, 01:48 AM
Hi!
Was reading this topic and the whole anti-scene propaganda got my attention. Now I'm curious... How does Flash read scenes? like they are MCs nested on _root? or independent .swfs stacked together in one file?
Greetings to all
Sir Patroclo
Billy T
02-19-2003, 01:58 AM
flash just puts all the scenes into one long timeline when you publish the swf
cheers
Sir Patroclo
02-19-2003, 02:06 AM
Hi. But, how does it handle the frame numbers then? I mean, if it puts the whole thing in one timeline, then the first frame of scene 2 might be placed 67 in it...
Billy T
02-19-2003, 02:11 AM
exactly
so if you are in scene 2 and you say
_root.gotoAndStop(66);
then you will be taken to the last frame of scene 1
Sir Patroclo
02-19-2003, 04:16 AM
:eek: Now I see why it's evil!
Thanks for the explanation.
Greetings
Sir Patroclo
electronic ink
02-19-2003, 09:08 AM
I believe you are correct.
When the sceens are tied together the timeline frame numbers just automatically increase so if scene1 has 20 frames in it scene2 frame one just becomes plain old boring frame 21 of scene1.
Scenes are just there to help the author to lay his work out. In short they are like giant folders such as Photoshop's layers folders.
Because when your movies get bigger it gets mentally harder to see what you are doing.
electronic ink
electronic ink
02-19-2003, 09:14 AM
It is best to use labels to navigate around the timeline. Because if you change or move a small bit of the movie on the timeline, you may find yourself having to change the frame numbers all the time.
If you use labels however you can take the whole chunk of movie and put it anywhere you want and not have to change a single gotoandplay code.
use this to link to any label
gotoAndPlay("/:nameoflabel")
electronic ink
Goosey
02-19-2003, 07:45 PM
wow i think i finally understand scenes and why they suck
Flash69
02-20-2003, 10:35 PM
Thanks again for the feedback everyone - im getting on great now without complicating things with scenes.
CyanBlue
02-20-2003, 10:56 PM
In case you want to know more, see this (http://www.kirupaforum.com/showthread.php?s=&threadid=15233)... :)
bernard
02-22-2003, 12:27 AM
Pardon, or not, my frustration. And sorry for the long winded message.
I'm having great difficulty deciphering the appropriate chain of command for calling functions, and named objects. Here is my scenario:
At the root scene I’ve got one frame with three timeline layers. The top has scripts, the next has a movie clip (named “shows”) and the third a background.
The shows clip currently has six frames and three timeline layers. The top is scripts, the next is navigation buttons and the bottom has the movie clips. I’ve also assigned names to each frame on the scripts layer.
The second frame in shows is named “mainMenu”. The movie clip in this frame has several buttons that are supposed to change the frame position of shows. In the scripts layer of this movie I call a function:
introSceneBTN.onRelease = function () {
_global.sceneChange("introduction");
}
At the root level, which I mentioned up above, I have a function called sceneChange that it calls:
_global.sceneChange = function(frame){
shows.gotoAndStop(frame);
}
Of course it does not work… and I don’t know why. I originally had the code written with _parent._parent… but could not get it to work and then I came across _global and thought… this is it! But no cigar.
What am I missing.
:confused:
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.