4 Replies Latest reply on May 31, 2007 11:38 AM by kglad

    Please Help

    alterego123
      Im new to actionscript so naturally im struggling. Here's the script then ill explain the problem....

      onClipEvent (enterFrame) {
      this._x = this._x-7.5;
      if (this._x<-1550) {
      this._x = 450;
      }
      }

      This MC consist of a series of buttons that move across my screen from right to left. What im tryin to do is stop the MC in its current X position on rollover. Right now I have this script to stop the MC on its current frame, but I cant stop the right to left movement.

      on (rollOver) {
      gotoAndStop(_currentframe);
      }

      Basically, Im tryin to pause the current x position.
      Any help would be greatly appreciated.
      Thanx.
        • 1. Re: Please Help
          kglad Adobe Community Professional & MVP
          you should really change your approach or you're going to have more of a mess than is worthwhile.

          remove all the code attached to your movieclip. give it an instance name (say mc1) and attach the following to a frame:

          • 2. Re: Please Help
            alterego123 Level 1
            Thanks for such a quick response, but here's what im gettin with that code...

            Symbol=people, Layer=man10, Frame=33: Line 2: Statement must appear within on/onClipEvent handler
            function moveMC(mc){

            Symbol=people, Layer=man10, Frame=33: Line 12: '{' expected
            delete this.onEnterFrame;

            Symbol=people, Layer=man10, Frame=33: Line 11: Statement must appear within on/onClipEvent handler
            mc1.onRollOver=function()

            Symbol=people, Layer=man10, Frame=33: Line 16: '{' expected
            moveMC(this);

            Symbol=people, Layer=man10, Frame=33: Line 15: Statement must appear within on/onClipEvent handler
            mc1.onRollOut=function()

            Symbol=people, Layer=man10, Frame=33: Line 19: Statement must appear within on/onClipEvent handler
            moveMC(mc1);
            • 3. Re: Please Help
              alterego123 Level 1
              Sry i miss read what you were actually telling me. I posted that on a seperate frame and it worked like a charm.
              Thank you so much kglad.
              • 4. Re: Please Help
                kglad Adobe Community Professional & MVP
                you're welcome.