http://www.gravityweb.com.ve/movie.swf
Código:
//initialize onClipEvent(load){ percent_increment = .025; 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 = false; } //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 = false; } _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; } }