3 Replies Latest reply on May 8, 2006 4:36 AM by Newsgroup_User

    Randomly select scene or swf

    Bhavzzz
      Hi,

      I'm quiet new to Flash and was wondering if it was possible to have a movie jump to random scenes or load random. swf’s I have tried everything and several tutorials as well but unfortunately they all seem not to answer my query. Basically what I need is for example the movie starts off with a list of buttons, which the user would press and according to the button pressed a random scene or swf (animation) which ever would be easier to create would be selected and displayed.

      I tried .swf load tutorials however when I run it, it shuts down the main buttons file and replaces it with itself so I’m left with the animation file and no buttons at all. I want it to be able to load on an empty space and not get rid of the buttons. The other tutorials I tried where actual LoadMovie/LoadmovieNum commands, however there is not capabilities within these to select random files.

      ummmm I’m really confused , I know its quiet adventurous for a newbie to tackle such a dilemma but I guess that's just me. So any help at all would be greatly appreciated and thank you in advance .
        • 1. Re: Randomly select scene or swf
          silvermole
          I would suggest using one MC timeline and not scenes. Have all btns on one layer and add individual mc/images etc to individual frames. Have a btn that will go to randomly selected frames using

          stop(); // to stop mc running on
          _root.next_btn.onRelease = function(){
          frameNo = Math.ceil(Math.random()*10); //generate randon number below mc frame length (eg.10 frames) and round up to integer
          gotoAndStop(frameNo); // go to this frame no.
          }
          • 2. Re: Randomly select scene or swf
            Bhavzzz Level 1
            Hi thanks for the reply however what is MC??, i'm not that familiar with Flash at all so i might be asking an obvious question but i don't really know it at all, so if you could explain it further then thank you.
            • 3. Re: Randomly select scene or swf
              Level 7
              Bhavzzz wrote:

              > Hi thanks for the reply however what is MC??, i'm not that familiar with Flash
              > at all so i might be asking an obvious question but i don't really know it at
              > all, so if you could explain it further then thank you.

              MC stands for Movie Clips and they have their own timeline. you can load
              movies, i.e. swf in them