View Full Version : Scene switch
surfer13
06-26-2005, 09:46 PM
I have duplicated scenes with some modifications. How can i switch scene (...on(release) for example...) to another scene, but skip to the same frame as in current scene and play?
cdrake
06-26-2005, 11:33 PM
Im confused. I am assuming you have multiple scenes in your fla. To go to a different scene all you have to do is give any frame in another scene a label. Then you can just go to that label and it will take you to the other scene.
oldnewbie
06-27-2005, 04:15 AM
I agree that targeting a labeled frame would always be the best method... But might not be appropriate in this situation...
Assuming your scenes all have the same total frames number (if they are duplicated but slightly different...), store the current frame number in a variable, and add to it the total number of frames (per scene) * by the number of scenes you're skipping to...
Thus if you're on Scene 1 on frame 15, and what to skip to Scene 3 frame 15...
// store the current frame...
_global.my_currentFrame = this._currentframe;
//then assuming your scenes held 50 frames each...
//thus targeting frame 50+50+15...
//_global.frame_toPlay = 50*2+_global.my_currentFrame;
_level0.gotoAndPlay( _global.frame_toPlay);
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.