niba
V6DP会员
精华
0
帖子 22
注册 2007-11-15
状态 离线
|
flash高手请进
遇到很棘手的问题
想要拜托各位帮帮忙
小女子不胜感激
请问我要将这个网站的三个导航改成五个导航应该怎么更改这些代码
网站链接:http://www.aveeno.co.kr/webzine_2008/main.jsp
网站代码
function autoPlayWon()
{
AutoID = setInterval(AutoPlay, speed);
} // End of the function
function AutoPlay()
{
AutoNum = AutoNum + 1;
if (AutoNum == 4)
{
AutoNum = 1;
} // end if
Click(AutoNum);
} // End of the function
function goURL(Num)
{
getURL("javascript:link" + Num + "()", "");
} // End of the function
function linkEvent(Num)
{
getURL("javascript:link" + (Num + 3) + "()", "");
} // End of the function
function Click(Num)
{
Con.gotoAndStop(Num);
pNum = Num;
bgGO(Num);
for (i = 1; i < 4; i++)
{
this["Con" + i].reversePlayW();
this["mc" + i].reversePlayW();
} // end of for
this["Con" + Num].overPlayW();
this["mc" + Num].overPlayW();
} // End of the function
function bgGO(Num)
{
mcBG.gotoAndStop(Num);
if (Num == 1)
{
Mask.SmoothRotation(0.200000, -44);
mcBG.SmoothRotation(0.200000, -44);
}
else if (Num == 2)
{
Mask.SmoothRotation(0.200000, 0.500000);
mcBG.SmoothRotation(0.200000, 0.500000);
}
else if (Num == 3)
{
Mask.SmoothRotation(0.200000, 45);
mcBG.SmoothRotation(0.200000, 45);
} // end if
} // End of the function
mcBG.stop();
Con.stop();
hit.useHandCursor = false;
hit1.onRelease = function ()
{
getURL("javascript:footer1()");
};
hit2.onRelease = function ()
{
getURL("javascript:footer2()");
};
hit3.onRelease = function ()
{
getURL("javascript:footer3()");
};
hit4.onRelease = function ()
{
getURL("javascript:mailTo()");
};
hit5.onRelease = function ()
{
getURL("javascript:footer4()");
};
speed = 7000;
AutoNum = 0;
hit.onRollOver = function ()
{
clearInterval(AutoID);
};
hit.onRollOut = function ()
{
autoPlayWon();
};
for (i = 1; i < 4; i++)
{
this["event" + i].stop();
this["Con" + i].stop();
this["mc" + i].stop();
this["event" + i].hit.num = i;
this["event" + i].hit.onRollOver = function ()
{
this._parent.overPlayW();
};
this["event" + i].hit.onRollOut = function ()
{
this._parent.reversePlayW();
};
this["event" + i].hit.onRelease = function ()
{
linkEvent(this.num);
};
this["mc" + i].hit.num = i;
this["mc" + i].hit.onRollOver = function ()
{
clearInterval(AutoID);
AutoNum = this.num;
Click(this.num);
};
this["mc" + i].hit.onRollOut = function ()
{
autoPlayWon();
Click(pNum);
};
this["mc" + i].hit.onRelease = function ()
{
goURL(this.num);
};
} // end of for
MovieClip.prototype.overPlay = function (targetFrame)
{
if (targetFrame == null)
{
targetFrame = this._totalframes;
} // end if
this.onEnterFrame = function ()
{
if (targetFrame > this._currentframe)
{
this.nextFrame();
}
else
{
this.gotoAndStop(targetFrame);
this.onEnterFrame = null;
} // end if
};
};
MovieClip.prototype.reversePlay = function (targetFrame)
{
if (targetFrame == null)
{
targetFrame = 1;
} // end if
this.onEnterFrame = function ()
{
if (targetFrame < this._currentframe)
{
this.prevFrame();
}
else
{
this.gotoAndStop(targetFrame);
this.onEnterFrame = null;
} // end if
};
};
MovieClip.prototype.smoothMoveY = function (speed, tY)
{
this.onEnterFrame = function ()
{
if (Math.abs(tY - this._y) < 1)
{
this._y = tY;
this.onEnterFrame = null;
}
else
{
this._y = this._y + speed * (tY - this._y);
} // end if
};
};
MovieClip.prototype.smoothMoveH = function (speed, tH)
{
this.onEnterFrame = function ()
{
if (Math.abs(tH - this._height) < 1)
{
this._height = tH;
this.onEnterFrame = null;
}
else
{
this._height = this._height + speed * (tH - this._height);
} // end if
};
};
MovieClip.prototype.SmoothRotation = function (speed, tR)
{
this.onEnterFrame = function ()
{
if (Math.abs(tR - this._rotation) < 0.100000)
{
this.onEnterFrame = null;
} // end if
this._rotation = this._rotation + speed * (tR - this._rotation);
};
};
MovieClip.prototype.overPlayW = function (targetFrame)
{
if (targetFrame == null)
{
targetFrame = this._totalframes;
} // end if
this.onEnterFrame = function ()
{
if (targetFrame > this._currentframe)
{
this.nextFrame();
}
else
{
this.gotoAndStop(targetFrame);
this.onEnterFrame = null;
} // end if
};
};
MovieClip.prototype.reversePlayW = function (targetFrame)
{
if (targetFrame == null)
{
targetFrame = 1;
} // end if
this.onEnterFrame = function ()
{
if (targetFrame < this._currentframe)
{
this.prevFrame();
}
else
{
this.gotoAndStop(targetFrame);
this.onEnterFrame = null;
} // end if
};
};
|
|