//enable the invisible drag script startDrag("dragger", true); //the main script // *** Overal parameters *** // proximity = "50"; factor = "2"; base = "100"; Mouse = getProperty("dragger", _y); // *** Instance specific parameters *** // center = "60"; instance = "text-top"; // *** Here we check for the TOP TEXT *** // if ((Mousecenter-proximity)) { change = base-factor*Math.abs(Math.abs(center)-Math.abs(Mouse)); setProperty("text-top", _alpha, change); } else { setProperty("text-top", _alpha, 0); } // *** Instance specific parameters *** // center = "150"; instance1 = "text-mid1"; instance2 = "text-mid2"; // *** Here we check for the MIDDLE TEXT *** // if ((mousecenter-proximity)) { change = base-factor*Math.abs(Math.abs(center)-Math.abs(mouse)); setProperty(instance1, _alpha, change); setProperty(instance2, _alpha, 100-change); } else { setProperty(instance1, _alpha, "0"); setProperty(instance2, _alpha, "100"); } // *** Instance specific parameters *** // center = "250"; instance = "text-bot"; // *** Here we check for the MIDDLE TEXT *** // if ((mousecenter-proximity)) { change = base-factor*Math.abs(Math.abs(center)-Math.abs(mouse)); setProperty(instance, _alpha, change); setProperty(instance, _xscale, 200-change); setProperty(instance, _yscale, 200-change); } else { setProperty(instance, _alpha, "0"); setProperty(instance, _xscale, "200"); setProperty(instance, _yscale, "200"); } //the third line gotoAndPlay(2); how to scroll //initialize onClipEvent(load){ percent_increment = .075; addstrip2 = false; } onClipEvent(enterFrame){ // this is it! only one line of code! this._x += (_root._xmouse - 320)*percent_increment; //now, in order to have a seamless strip //you have to tell the movie (1)when to duplicate the strip and (2)whether to put it on the right or left side //when moving left... //add strip2 to the right side of the strip if the strip is less than 0 if(this._x <=0 && this._x >= -this._width){ //only add it when addstrip2 is false otherwise it will contiually add strip2 if(addstrip2==false){ this.duplicateMovieClip("strip2",1); addstrip = true; } //position strip2 //subtract 1 cause the border will look wide when it's put next to the other border _root.strip2._x = this._x + this._width-1; _root.strip2._y = this._y; } //once the strip has moved off the screen(left side),take it and put it on the right end of strip2 if(this._x <= -this._width){ this._x = _root.strip2._x + this._width - 1; } //when moving right... (same code as moving left but checking for different positions) if(this._x >0 && this._x < this._width){ if(addstrip2==false){ this.duplicateMovieClip("strip2",1); addstrip = true; } _root.strip2._x = this._x - this._width + 1; _root.strip2._y = this._y; } if(this._x >= this._width){ this._x = _root.strip2._x - this._width + 1; } }