PDA

View Full Version : [fmx] jumping scenes problem



shangrula
March 23rd, 2004, 02:46 PM
Hi,

I am trying to jump from one scene called main to other named tutorial 1-6 here is my code to jump to tutorial 2 as an example

on (release) {
_root.gotoAndPlay("Tutorial2");
}

I've tried every variation that I can think of, no _root gotoAndStop and also putting in _root.gotoAndStop("Tutorial 2", 1);

i dont know if it makes a difference but the navigation buttons are on a movie clip which pops up over the main stage...if that makes sense, that flash file is huge i didnt want to attach the whole thing...

please if someone can help it'll be really appreciated


Matt.

Seticus
March 24th, 2004, 07:18 AM
Scenes are tricky:
The most important rule is that scenes can only be targetted from the main timeline.

The solution is to work with labels, give a Frame label to the frame in scene two, for instance: "label1" and use:on (release) {
_root.gotoAndStop("label1");
}Because labels are not scene dependant, it will search all the scenes to find the frame with that label...

Good luck