Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

radomize scene's in flash

Does anyone know how i can randomize the order my two scenes in a flash movie play?

I don't always want scene 1 to come first...
1 Solution
Create a 3rd scene and make sure it plays first. Put the following actionscript on frame one of the new scene

dice = Math.floor(random(2)+1);
if (dice == 1) {
      gotoAndPlay("Scene 1", 1);
      gotoAndPlay("Scene 2", 1);      

and replace the "Scene 1" and "Scene 2" with the names of your scenes.


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now