radomize scene's in flash

Posted on 2009-02-18
Last Modified: 2013-11-28
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...
Question by:sturobinson17
    1 Comment
    LVL 19

    Accepted 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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    On April 11th, 2011, Google’s next iteration of the Panda algorithm was rolled out to English language queries in the USA, and the original Panda update was rolled out to all English language queries from around the world.  This update caused  addit…
    Many times, I come across people who own various domains in addition to their primary domain and are simply redirecting them to their primary domain.  These people often consider building a microsite ( on those…
    The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
    Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now