1 Reply Latest reply on Jun 6, 2007 11:04 AM by crazyjoemilan

    Help me figure out this script

    zzkid25
      Hey Guys,

      This is the first time EVER posting a blog, so bear with me if i'm a bit slow. My problem is that i'm just getting into Flash, just got Flash CS3, and I downloaded a pre-made menu from istockphoto.com. The thing is I can't figure out how to get the buttons to link to another scene in Flash. Can anyone help out? and if i'm not posting enough info let me know what I need to do. Thanks for your time.

      Alx.

      Here's the action script, where do I change the script to play the next scene of my movie?

      on (release) {
      getURL("#");
      }

      on (rollOver)
      {
      if (_root.link != 5)
      {
      gotoAndPlay(2);
      } // end if
      }
      on (releaseOutside, rollOut)
      {
      if (_root.link != 5)
      {
      gotoAndPlay(21);
      } // end if
      }
      on (release)
      {
      if (_root.link != 5)
      {
      _parent["but" + _root.link].gotoAndPlay("s2");
      _root.link = 5;
      } // end if
      }
        • 1. Re: Help me figure out this script
          crazyjoemilan Level 2
          on (release) {
          getURL("#");
          }
          //if you click the button this script is attached to, it will take you to "#" in your browser.

          on (rollOver)
          {
          if (_root.link != 5)
          {
          gotoAndPlay(2);
          } // end if
          }
          //The above script says that if the _root variable "link" does not = 5, to gotoAndPlay(2) of the current movieclip.

          on (releaseOutside, rollOut)
          {
          if (_root.link != 5)
          {
          gotoAndPlay(21);
          } // end if
          }
          same thing as above, but for releaseOutside, or rollOut, and it will play 21.

          on (release)
          {
          if (_root.link != 5)
          {
          _parent["but" + _root.link].gotoAndPlay("s2");
          _root.link = 5;
          } // end if
          }
          on click, this button will will go to _parent.butx (where x is _root.link) .gotoAndPlay(frame "s2") -- if _root.link does not = 5. make sense? It then sets the _root variable "link" to 5.

          so you have two on(release) button functions, which isn't right. Also, I've never used two on statements in the same shot --- on(releaseOutside, rollOut) does that work properly?

          so if you want to gotoAndPlay a certain scene, you can just change a bit of the script. -- think you can figure out where with my explanations? Or did I just make it more confusing.