0 Replies Latest reply on Oct 6, 2009 1:23 AM by savage3327

    movie slider mechanism

    savage3327

      Hi there, below is the code I'm using for a flash project which has 6 masked movies which slide into position when the relevent header is selected from the navigation bar.

       

      However, I have some animation contained within each of the movies which I would like to reload each time any particular navigation header is selected - any ideas anyone?

       


      _global.numOfMenu = 6;
      _global.widthOfImage = 700;

      speedOfImage = 4;
      speedOfPoint = 4;

      _global.active = pageNum;
      if (!active) {
      _global.active = 1;
      }
      _global.over = click=active;
      for (i=1; i<=numOfMenu; i++) {
      this[i].bg.onRollOver = function() {
        _global.over = this._parent._name;
      };
      this[i].bg.onRollOut = this[i].bg.onDragOut=function () {
        if (click != this._parent._name) {
         _global.over = click;
        }
      };
      this[i].bg.onRelease = function() {
        click = Number(this._parent._name);
      };
      this[i].onEnterFrame = function() {
        if (over == this._name) {
         this.swapDepths(1);
         this.nextFrame();
        } else {
         this.prevFrame();
        }
      };
      }
      pointer.onEnterFrame = function() {
      this._x += (this._parent[click]._x-this._x)/speedOfPoint;
      };
      image.onEnterFrame = function() {
      this._x += (-(click-1)*widthOfImage-this._x)/speedOfImage;
      };