PDA

View Full Version : [MX] gotoandStop ("framelabel") ?



Felipe Bastos
May 30th, 2003, 05:07 PM
It sounds simple!
Can I jump to a frame using the frame label?
Like this:

_root.C.inicio.onRelease = function() {
mouseRelease(inicio);
_root.content.gotoAndStop("inicio"); // this code line?
}

:)

catreya
May 30th, 2003, 05:48 PM
yes. i should work. why dont you try it?

Felipe Bastos
May 30th, 2003, 06:20 PM
I tyied but it didnt work!!!
What might be wrong?

catreya
May 30th, 2003, 08:58 PM
i tried the following and it worked:


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

Felipe Bastos
May 31st, 2003, 03:54 AM
But it`s a movieclip attached to another movieclip!
I`ll check that!

Thanks

Felipe Bastos
June 2nd, 2003, 11:34 AM
I still cant make this work! :(


on(release) {
// loadMovie e goto frame 2.
_root.content.loadMovie("cap01/cap01.swf");
_root.content.gotoAndStop(2);
}

It does not work even if I use frame label!
What is happening?! Help me!!
...

lostinbeta
June 2nd, 2003, 12:25 PM
You can't manipulate the movie until it is fully loaded.

Felipe Bastos
June 2nd, 2003, 12:55 PM
I`m working on a cdrom project.
It loads the file.swf in a quick, thats why I thought it should work!!!
Can you think of something?

thanks

lostinbeta
June 2nd, 2003, 02:32 PM
It loads it quick, but it doesn't load it at the exact same time the loadMovie() command is called.

What you could do is set a variable to hold what frame label to play. Then in frame 1 of the movie you are loading have the gotoAndPlay in there and target the variable that holds the frame label.

Felipe Bastos
June 2nd, 2003, 04:24 PM
Can u help me with that and give an example?!

:)

lostinbeta
June 2nd, 2003, 05:23 PM
Button:
on (release){
_root.playLabel = "frameLabelToPlay";
_root.content.loadMovie("cap01/cap01.swf");
}

Frame 1 of loaded movie:
gotoAndPlay(_root.playLabel);

:-\

Felipe Bastos
June 3rd, 2003, 01:00 AM
It`s working fine!!!
The frame that is labed is the frame 2 in every swf loaded.
It`s like a book, and frame 1 is the index.
So in frame 2 I had to use the following code otherwise I could not go to frame 1.


_root.playLabel = "";

Thanks
:)

lostinbeta
June 3rd, 2003, 01:15 AM
No problem, glad you got it working :)