0 Replies Latest reply on Sep 7, 2007 12:22 PM by noir1210

    Action Script and movie clip dimensions

    noir1210
      I created a scrolling panel within a movie clip and it works fine but only if the movie clip is in the center of the main scene. Is there a way to restrict the dimensions of a movle clip either by adjust the properties or using the x or y axis? I'm not very familiar with action script. here is the action script i used:

      panel.onRollOver = panelOver;

      function panelOver() {
      this.onEnterFrame = scrollPanel;
      delete this.onRollOver;
      }

      var b = stroke.getBounds (_rollover);

      function scrollPanel() {
      if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
      this.onRollOver = panelOver;
      delete this.onEnterFrame;
      }

      if (panel._x >= -115) {
      panel._x = -115
      }

      if (panel._x <= -465) {
      panel._x = -465
      }

      var xdist = _xmouse - 0

      panel._x += -xdist / 25;
      }