Variably jumping to different scenes!?

  • Stev
  • Born
  • Born
  • Stev
  • Posts: 2

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

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:
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

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
  • Stev
  • Posts: 2

Post 3+ Months Ago

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 14 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
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.