0 Replies Latest reply on Feb 10, 2011 3:05 PM by Saintranger

    Linking Movieclipsevents

    Saintranger

      I'm getting back into the game of flash.  I haven't done much in a while.  Got Flash cs4.  I've got a  template and I want to link the buttons on the flash header to other  pages of the website I'm developing.  It's got onclipevents.  Here is  the code.

      onClipEvent (load)
      {
      num = 5;
      link = "locations.html";
      }
      onClipEvent (load)
      {
      _root["xkoord" + num] = this._x;
      this.accel2 = _root.accel2;
      this.rate1 = _root.rate1;
      this.x = 1;
      }
      onClipEvent (enterFrame)
      {
      if (this._x != _root["xkoord" + num])
      {
      this.x = this.x * this.accel2 + (_root["xkoord" + num] - this._x) * this.rate1;
      this._x = this._x + this.x;
      if (Math.abs(_root["xkoord" + num] - this._x) < 1)
      {
      this._x = _root["xkoord" + num];
      } // end if
      } // end if
      }

      Now there are other codes hidden within the layers.  This is all for the "Home" button.

      if (_root.link != num)
      {
      mm.gotoAndPlay("s1");
      } // end if

      If anyone can help, please.  I'll be glad to send the .FLA file if needed.  Thanks