View Full Version : humm, I'm slow with TARGETING...
donkyshot
09-29-2003, 08:17 PM
Many times, i have to target the main timeline from a button on a MovieClip. I use the something like :
on (release) {
_root.gotoAndStop("Conclusion", 1);
}
where Conclusion is the scene name. Well, even with trying _level0 instead of _root, it did not work neither. So can someone tell me the right order to target a frame out of this movie please.
Thank You
p.s. for this project i can not get rid of the scene... unfortunatly!
pellepiano
09-29-2003, 09:36 PM
You can not target scenes from within a movieclip.
You make a framelabel on the frame where you want to go to and reference that. Like...
on(release){
_root.gotoAndPlay("myFrameLabel");
}
Xenozip
09-29-2003, 09:56 PM
// Actions for Frame1, Scene1
skipScene = function() {
gotoAndPlay("Scene2", 1)
}
// Actions for Button1 inside MovieClip1
on (press) {
_root.skipScene();
}
// Actions for Frame1, Scene2
stop();That worked fine for me.
The Button was inside the MC.
Pushing it jumped to the next scene and stopped..
pellepiano's method works too, but requires extra (unnecessary frames). Doing it this way you just referance a function instead of a frame.
The great thing about this, is if you want to skip to different scenes from the first scene, all you have to do as add more functions (rather than even more frames).
Although, pellepiano's method is probably better for creating transition effects between scenes. But, if you just want to jump to a new scene instantly, use a function in the main timeline and have the button call the function.
donkyshot
09-29-2003, 10:55 PM
wow, it also explain me the Function concept...
Thanks a lot
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.