PDA

View Full Version : Can't jump out of one movie to another?



lynott
August 22nd, 2002, 07:26 AM
Hi,

I have three buttons all in a movie clip called 'container'.

I am loading variable into container from a text file and doing a test to see which button is the correct one. At the moment that is all working fine, when the correct button is pressed I output "yes" using the trace command.

I want to however jump to another movie entirely called 'Succ' when the correct button is pressed and jump to a movie called 'Fail' otherwise.

Each button has the following code attached to it

on (press) {
if (this.p1) {
trace("yes");
gotoAndPlay("Scene 1", "Succ");
} else {
trace("no");
}
}

I have created a layer called 'Movies' at the Scene 1 level and on the sixth frame I have inserted a keyframe and called the frame 'Succ'. I have my successfull movie here, which is what I am trying to jump to when my correct button is clicked.


What am I doing wrong?

Any help would be much appreciated.

Thanks

L.

upuaut
August 22nd, 2002, 07:49 AM
the goto statement should have a '_root.' at the beginning like so.


on (press) {
if (this.p1) {
_root.gotoAndPlay("Scene 1", "Succ");
}
}


Other than that, I can't find anything wrong. I'd probebly have to look at the file.

lynott
August 22nd, 2002, 07:56 AM
It still didn't seem to work.

Is it ok if I send you the zip file to take a quick look?

L.

upuaut
August 22nd, 2002, 08:09 AM
sure.. my addie is upuaut@centerspin.com

lynott
August 22nd, 2002, 08:11 AM
That's OK David.

I got it working,

thanks again for your help.

This worked

on (release){
if (this.p0){
trace("yes");
_root.gotoAndPlay("Succ");
} else{
trace("no");
}
}

:)

Combination of both.

upuaut
August 22nd, 2002, 09:40 AM
You know.. I hate scenes.. I know I relented on that a while ago.. but for the life of me I can never seem to remember how to get them to work. Glad the _root worked for you. In that case, _parent would work too.