PDA

View Full Version : gotoandplay outside of movie clip


danbradster
02-24-2006, 01:24 PM
I have set up a movie clip which has three buttons in it, on the buttons I have the following code -

on (release) {
gotoAndPlay("Scene 1", 5);
}

Is this the correct code? When I run the movie, nothing happens when I press the buttons, I have attached the .fla if that helps. Does anyone see any reason why the buttons wouldn't work?

Thanks.

shikozel
02-24-2006, 01:43 PM
you have 3 problems with your code

1. when you write:
gotoAndPlay("scene1", 5);
the timeline will go and play frame 5 untillthe next stop action.( you dont have one)

2. the refference should be frame 5 on main timeline. you should use _root.

3. Scences are very tricky. Avoid them. I have never used them.

correct code:
_root.gotoAndStop(5);

danbradster
02-24-2006, 02:50 PM
Thanks for the help, _root fixed my problem. :)