Navigating Scenes
- Started
- Last post
- 16 Responses
- Jimmy_Page
I have a problem with one of my buttons. I want to navigate to a scene called Salon, but when i press my button it goes to another frame within the scene the button is within. I've attached the following script to my button:
on (release) {
gotoAndPlay("salon");
}The code above should take me to a scene called salon, but instead the playhead goes to frame 115. When i get to frame 115 theres no content after this frame, but when i press the button again to go to the salon scene, it works?
I would be greatful for any help.
Cheers
- kyl30
gotoAndStopScene(Sce neFrame, MovieClipFrame);
gotoAndPlayScene(Sce neFrame, MovieClipFrame);
- ********0
scenes are bad.
load movieClips instead.
- Jimmy_Page0
thanks for the sript Kyl3, i've tried put the scene name Salon for example below.
gotoAndPlayScene("salon");
but still doesn't work, are you mean't to put the scene name as above...any ideas?
Cheers
- kyl30
may try 'scene, frame 1' or do what mx said and load an mc.
- ********0
which version of Flash are you using jimmy?
- ********0
if you totally must use scenes then what you want to do is this...
gotoAndPlay("salon", 1);
- Jimmy_Page0
Cheers for the help guy's, but neither code is working, i wish you could attach screen shots here as i'd show you my timeline.
It's MX 2004 pro i'm using MX_OnD.
- ********0
mail me jimmy, mail me yer fla if need be.
- kyl30
- Jimmy_Page0
cheers MX_OnD, OK i'll mail you the file.
- kyl30
sorry, couldn't resist
- ********0
hehehe kyl ;-)
- Jimmy_Page0
It's OK, it's not me...It's flash. LOL
- Jimmy_Page0
Hey MX_OnD i used (as you suggested, cheers)
gotoAndPlay("salon", 1);
and it worked. I used this before, but it didn't work. I now know to compile your actionscript, save your movie, then test it. Before i was compiling the actionscript, and testing. What the later was doing was testing the previous code i put in, as i wasn't saving then testing.
I'm that used to Director MX where you compile your code and test your movie, without the saving part.
At least i know now to save before testing your movie.
Cheers
- ********0
nice one, glad to know it's working for you!
Essentially it shouldn't matter if you save or not, although perhaps that's an anomoly when using scenes (seriously, try to get away from using them, they're not really AS friendly).
Also it's good practise to save before testing anyway, furthermore I'd recommend doing a "save as" instead of simply "save", use a convention of filename001, filename002 and so on. This will help you avoid corrupted files - doesn't happen often but when it does it is bloody frustrating!
- Jimmy_Page0
Cheers bud, thanks for helping me out (thanks to kyl3 also). i'll keep in mind the advice regarding the filename structure.
All the best.
