About a website flash navigation bar

xiaoxiao2021-03-06  101

Http://shineday.nease.net/

The code here is plagiarism, and it is basically to explain the problem and solve the problem :)

VAR DRAG = 0.1; // Vibration parameter var flex = 0.7; // Vibration parameter mc._y = 20; mc.goalx = 10; // Load the movie clip (i.e., slider) first appear positional MC. Oneterframe = function () {this.step = this.step * flex (this.goalx-this.px) * DRAG; // Calculate the formula of the slider movement THIS.PX = this.step; // Tired, personal thinking this is important, equivalent to a loop, based on this mobile step, the next accumulation THIS._X = this.px; // Make the X-axis axis of the movie clip equals IF (this. Sout && This._xscale <99.5) {/ * Here is zoom movie clip * / this._xscale = (100-this._xscale) / 8;} f (this.sin && this._xscale> 0.1) {this._xscale = -THIS._XSCALE / 8;}};

THE FIRST Button Events

B1.Onrollover = function () {mc.goalx = this._x; // Assign the X coordinate value of the button to the initial position of the movie clip, that is, the next movement is based on this time as the origin, according to the button And the size of the movie clip, if the button is smaller than the movie clip, add some values ​​to adjust mc.Sout = true; / * Here is the function returned to the call to call it, as follows: IF (this . Sout && this._xscale <99.5) to control the zoom function of the entire video clip * / mc.sin = false; this.fadeout = true; this.fadein = false;}; b1.onrollout = function () {mc. Sout = false; mc.sin = true; this.fadein = true; this.fadeout = false;}; // the second button Events b2.onrollover = function () {mc.goalx = this._x; mc.sout = True; mc.sin = false; this.fadeout = true;}; b2.onrollout = function () {mc.Sout = false; mc.sin = true; this.fadein = true; Fadeout = false;}; // the third button events

B3.onrollover = function () {mc.goalx = this._x; mc.sout = true; mc.sin = false; this.fadeout = true; this.fadein = false;}; b3.onrollout = function () { Mc.Sout = false; mc.sin = true; this.fadein = true; this.fadeout = false;}; // the fourton events b4.onrollover = function () {mc.goalx = this._x; mc. Sout = true; mc.sin = false; this.fadeout = true; this.fadein = false;}; b4.onrollout = function () {mc.sout = false; mc.sin = true; hHIS.FADEIN = true This.fadeout = false;}; // The fiffh butt () {mc.goalx = function () {mc.goalx = this._x; //trace(mc.goalx; mc.sout = true; mc.sin = false This.fadeout = true; this.fadein = false;}; b5.onrollout = function () {mc.sout = false; mc.sin = true; this.fadein = true;}; stopout = false;}; stop ();

转载请注明原文地址:https://www.9cbs.com/read-124307.html

New Post(0)