PDA

View Full Version : [F5] nextScene problem...



dshallenberger
June 10th, 2003, 04:01 PM
Please forgive my ignorance if this is a simple problem. I worked around it, but I still wonder what I was doing wrong.

I setup a movie as 5 different scenes. The first scene is the loading animation that sends the user to scene 2 when it's loaded, and then scenes 2-5 can be switched between with 4 buttons in each scene. These for buttons are on the root timeline and they work fine switching between scenes. But, I have a different button inside a mc on the root timeline that I want coded to load the next scene, but it won't work. I tried nextScene();, gotoAndStop("the_scene_name",1);, _root.nextScene();, and other combinations, all to no avail. But, if I put that same code in a button on the root timeline, works perfect.

What am I doing wrong? I'm sure it's simple, but I couldn't find a solution in Help or the manual. Also, is it better to setup something like this as different scenes, or as separate movies?

Thanks much!

Dan

SteveD
June 11th, 2003, 12:07 PM
Hi,
There are lots of probs with accessing scenes, don't know why myself, and I have read ( somewhere here) that you cannot access a scene from a button nested inside an mc.
If you are using frame labels try
on(release){
_root.gotoAndPlay("label");
}
If you are not using labels point to the frame number but remeber that Flash counts from the first frame in the movie, i.e if you have 5 scenes with 10 frames in each, frame 7 in scene 3 will be frame 27

Hope that helps

SteveD