4 Replies Latest reply on Sep 23, 2006 12:11 AM by Sanguis_Inferno

    help

    Sanguis_Inferno
      Im trying to make a 'button' with a movie clip so when you roll over it it activated the movie clip and when you roll out it doesnt go back to the start of the movie clip (like a button does). Iv put in this actionscript:

      onClipEvent
      screen_mc.onRollOver = function () {
      this.gotoAndStop("2");
      }

      And it says in the output window:

      **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 2: '(' expected
      screen_mc.onRollOver = function () {

      Total ActionScript Errors: 1 Reported Errors: 1

      Can someone please help me with this needs to be done by like, tomorrow lol.
        • 1. Re: help
          TimSymons Level 1
          Which ever timeline your movieclip is on, place the following script, on the first frame that contains your movieclip button:

          screen_mc.onRollOver = function() {
          this.gotoAndStop("2");
          };

          Make sure you place the script in the frame and do not attach it to the movieclip.

          If you want it attached to the movieClip, then open the screen_mc movieclip and on the first frame place the following script:

          this.onRollOver = function() {
          gotoAndStop(2);
          };

          Hope this gives you what you need.

          Tim
          • 2. Re: help
            Sanguis_Inferno Level 1
            thanks helped lots, but can I ask another question, how would I make it so onced i hade rtolled over it once if i did it again it wouldnt play the movie clip again?
            • 3. Re: help
              TimSymons Level 1
              screen_mc.onRollOver = function() {
              if (this._currentframe == 1) {
              this.gotoAndStop(2);
              }
              };

              This will only execute the gotoAndStop() method if the movieclip's timeline is on the frame 1.

              Tim
              • 4. Re: help
                Sanguis_Inferno Level 1
                Thanks lots, much appreciated.