Variably jumping to different scenes!?

  • Stev
  • Born
  • Born
  • No Avatar
  • Joined: Jul 01, 2004
  • Posts: 2
  • Status: Offline

Post July 1st, 2004, 10:33 pm

I'm absolutely stuck and would appreciate any help.

I have a scene with lets say 4 buttons. Each button goes to a different scene, but what i need is for every one of those buttons to play the end of the current scene before jumping to their allocated ones.

I've looked at actionscript tutorials and asked a few wannabe programers, but i can't find an answer.

Does anyone know how to do this?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 1st, 2004, 10:33 pm

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post July 2nd, 2004, 4:49 am

I don't use scenes as they are outdated from what I gather.
However, you could try placing a keyframe at the end of each scene with gotoAndPlay(sceneNameVariable) in it. Have each button update sceneNameVariable then play() this should allow the scene to finish playing before the jump.

As I said, I don't use scenes so this is only a "maybe this would work", don't quote me on it :wink:
Strong with this one, the sudo is.
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Joined: Jun 26, 2003
  • Posts: 1402
  • Loc: Philadelphia, PA
  • Status: Offline

Post July 2nd, 2004, 4:55 am

You are correct joebert.

Though what I would recommend doing is giving the first frame in each scene a frame label. Then changing the value of the variable to hold the name of the frame label then using
Code: [ Select ]
_root.gotoAndPlay(frameLabelVariable);


The reason for this is because Flash is a bit wonky when it comes to using the gotoAndPlay(Scene, Frame) method.

And as joe said, scenes are outdated, and Macromedia has expressed little interest in fixing the bugs that occur with them. The reason being that things such as loadMovie() and loadMovieNum() can easily replace scenes, and are much more efficient.
  • Stev
  • Born
  • Born
  • No Avatar
  • Joined: Jul 01, 2004
  • Posts: 2
  • Status: Offline

Post July 2nd, 2004, 8:24 pm

lostinbeta u sickcunt! thanks mate!


Joebert, thanks for your help aswell. I was trying it out from the minute you guys posted and i couldn't get it to work. Finally i tried FrameLabel instead and .... yus is good!!

Thank you both. You've revived my project with new hope.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 33 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.