谁会解释这段flash 动作语句啊?

来源:百度知道 编辑:UC知道 时间:2024/06/14 14:44:32
myURL = ["index.asp", "products.asp", "news.asp";
numOfMenu = 3;
_global.active = pageNum;
_global.over = active;
for (i = 1; i <= numOfMenu; i++)
{
this[i].rect1.mainText.gotoAndStop(i);
this[i].onRollOver = function ()
{
_global.over = this._name;
};
this[i].onRollOut = this[i].onDragOut = function ()
{
_global.over = active;
};
this[i].onRelease = function ()
{
getURL(myURL[this._name - 1], "_self");
};
this[i].onEnterFrame = function ()
{
if (over == this._name)
{
this.nextFrame();
}
else
{
this.prevFrame();
} // end if
};
} // end of for
point.onEnterFrame = function ()
{
if (over)
{
this._x = this._x + (t

this[i].onRelease = function ()
{
getURL(myURL[this._name - 1], "_self");
};

这里改成

this[i].onRelease = function ()
{
if(i == numOfMenu - 1)
getURL(myURL[this._name - 1], "_blank");
else
getURL(myURL[this._name - 1], "_self");
};

this[i].onRelease = function ()
{
if(i!=numOfMenu){ //加一条判断
getURL(myURL[this._name - 1], "_self");
}
else{
getURL(myURL[this._name - 1], "_blank");
}
};