PDA

View Full Version : problem with goto(scene)


Zidane_ffs
10-01-2003, 10:31 AM
Okay this is gonna seem stupid but here we go...

I'm making a game and so far i have a title screen, options screen and character select screen. On the title screen I have 2 buttons, START amd OPTIONS. Know usually i'd use a button but instead I wanted to select them using the arrow keys so I used a pair of movieclips. The problem is when you hit Shift when selecting options it should go to options. However for some reason it goes to the start of the game - the little movie before the title screen.

Here's the action script

} else if (select==false && Key.isDown(Key.ENTER)) {
tellTarget (_root) {
gotoAndPlay("Options", 1);
}

You can ignore the first line, its the 3rd thats giving problems.
It should go there but it wont.

Can anyone tell me how to fix this?

Cheers
Zidane

catbert303
10-01-2003, 10:50 AM
Hi,

try using a frame label on the first frame of the options scene, and then using the actions,


} else if (select==false && Key.isDown(Key.ENTER)) {
_root.gotoAndPlay("yourFrameLabelHere");
}

Xenozip
10-01-2003, 05:08 PM
The only way I found to jump to a different scene from a movieclip or button was to do this :
// Actions for Frame1, Scene1
skipScene = function() {
gotoAndPlay("Scene2", 1)
}

// Actions for Button1/MovieClip1
on (press) {
_root.skipScene();
}

// Actions for Frame1, Scene2
stop();All you would have to modify is the conditions for the skipScene function.

omega10mg
10-01-2003, 10:44 PM
the absolute best would be to not use scenes, in my opinion.
Scenes always makes more problems than they make good, atleast when your not just making a movie.


:)