1 Reply Latest reply on May 2, 2006 5:03 PM by Newsgroup_User

    Math.Random and gotoAndPlay

    syrcharles
      So I'm trying to set things up so that in Frame 1 of my movie, it'll randomly pick between two possible frame labels and then jump there. It seems to work just fine if I publish for Flash 8, but most of my end users are going to have Flash 7 if I'm lucky. So I've been publishing for Flash 7, and each time, it only goes to the first label. And to make things even weirder, when I test it in Flash Player, it's fine, but when I load the published HTML, it's not. Here's my code.



        • 1. Re: Math.Random and gotoAndPlay
          Level 7
          syrcharles wrote:

          > So I'm trying to set things up so that in Frame 1 of my movie, it'll
          > randomly pick between two possible frame labels and then jump there. It
          > seems to work just fine if I publish for Flash 8, but most of my end users
          > are going to have Flash 7 if I'm lucky. So I've been publishing for Flash
          > 7, and each time, it only goes to the first label. And to make things even
          > weirder, when I test it in Flash Player, it's fine, but when I load the
          > published HTML, it's not. Here's my code.
          >

          Have you included a preloader in your movie? You should know that you cannot
          jump to a label untill that label has been loaded. Testing the movie
          locally, the loading is almost instantaneous and everything works; off the
          web, it is likely your code is frame 1 is executed before the rest of the
          movie is loaded and hence the code fails.

          Tim.