在一个有鼠标放到一个元件上显示另一张图片的flash上,怎么在这个原件上加链接,点击后跳转到另一个页面
他元件最顶上有个代码functionsetActiveMenu(){var_l1=_global;_l1.mainChk=main;_l1.subChk=sub;_l1....
他元件最顶上有个代码
function setActiveMenu()
{
var _l1 = _global;
_l1.mainChk = main;
_l1.subChk = sub;
_l1.subOver = 0;
} // End of the function
if (main == null || main == "" || main == undefined)
{
main = 0;
} // end if
var mainNum = 7;
var speed = 0.200000;
var lineD = _root.line1._y;
var lineP = lineD + 26;
_global.mainChk = main;
_global.subChk = sub;
_global.subOver = 0;
for (i = 1; i <= mainNum; i++)
{
_root["menu" + i].onRollOver = function ()
{
mName = new String(this._name);
mNum = mName.substr(4, 2);
_global.mainChk = mNum;
};
_root["menu" + i].onRollOut = function ()
{
_root.setActiveMenu();
};
_root["menu" + i].onRelease = function ()
{
mName = new String(this._name);
mNum = mName.substr(4, 2);
getURL("javascript:menu" + mNum + "();", "");
};
_root["mtxt" + i].onEnterFrame = function ()
{
var _l1 = this;
mName = new String(_l1._name);
mNum = mName.substr(4, 2);
if (mNum == _global.mainChk)
{
_l1.nextFrame();
}
else
{
_l1.prevFrame();
} // end if
};
_root["line" + i].onEnterFrame = function ()
{
var _l1 = _root;
mName = new String(this._name);
mNum = mName.substr(4, 2);
if (mNum != _global.mainChk)
{
_l1["line" + mNum]._y = _l1["line" + mNum]._y + (lineD - _l1["line" + mNum]._y) * speed;
}
else
{
_l1["line" + mNum]._y = _l1["line" + mNum]._y + (lineP - _l1["line" + mNum]._y) * speed;
} // end if
};
} // end of for
stop();
里面按钮里有
var mainNum = 1;
var subNum = 8;
for (i = 1; i <= subNum; i++)
{
this["sb" + i].onRollOver = function ()
{
sName = new String(this._name);
sNum = sName.substr(2, 2);
_global.mainChk = mainNum;
_global.subOver = sNum;
};
this["sb" + i].onRollOut = function ()
{
_parent.setActiveMenu();
};
this["sb" + i].onRelease = function ()
{
sName = new String(this._name);
sNum = sName.substr(2, 2);
getURL("product.asp");
};
this["s" + i].onEnterFrame = function ()
{
var _l2 = _global;
var _l1 = this;
sName = new String(_l1._name);
sNum = sName.substr(1, 2);
if (mainNum == _parent.main && sNum == _l2.subChk && _l2.subOver == 0)
{
_l1.nextFrame();
}
else if (sNum != _l2.subOver)
{
_l1.prevFrame();
}
else if (sNum == _l2.subOver)
{
_l1.nextFrame();
} // end if
};
} // end of for
stop();
要在哪里加链接呢? 我试了在原件上加按钮原先鼠标放上去显示另一张图就出不来了,求解......
不是按钮里,是元件里有代码,整个FLASH没有按钮 展开
function setActiveMenu()
{
var _l1 = _global;
_l1.mainChk = main;
_l1.subChk = sub;
_l1.subOver = 0;
} // End of the function
if (main == null || main == "" || main == undefined)
{
main = 0;
} // end if
var mainNum = 7;
var speed = 0.200000;
var lineD = _root.line1._y;
var lineP = lineD + 26;
_global.mainChk = main;
_global.subChk = sub;
_global.subOver = 0;
for (i = 1; i <= mainNum; i++)
{
_root["menu" + i].onRollOver = function ()
{
mName = new String(this._name);
mNum = mName.substr(4, 2);
_global.mainChk = mNum;
};
_root["menu" + i].onRollOut = function ()
{
_root.setActiveMenu();
};
_root["menu" + i].onRelease = function ()
{
mName = new String(this._name);
mNum = mName.substr(4, 2);
getURL("javascript:menu" + mNum + "();", "");
};
_root["mtxt" + i].onEnterFrame = function ()
{
var _l1 = this;
mName = new String(_l1._name);
mNum = mName.substr(4, 2);
if (mNum == _global.mainChk)
{
_l1.nextFrame();
}
else
{
_l1.prevFrame();
} // end if
};
_root["line" + i].onEnterFrame = function ()
{
var _l1 = _root;
mName = new String(this._name);
mNum = mName.substr(4, 2);
if (mNum != _global.mainChk)
{
_l1["line" + mNum]._y = _l1["line" + mNum]._y + (lineD - _l1["line" + mNum]._y) * speed;
}
else
{
_l1["line" + mNum]._y = _l1["line" + mNum]._y + (lineP - _l1["line" + mNum]._y) * speed;
} // end if
};
} // end of for
stop();
里面按钮里有
var mainNum = 1;
var subNum = 8;
for (i = 1; i <= subNum; i++)
{
this["sb" + i].onRollOver = function ()
{
sName = new String(this._name);
sNum = sName.substr(2, 2);
_global.mainChk = mainNum;
_global.subOver = sNum;
};
this["sb" + i].onRollOut = function ()
{
_parent.setActiveMenu();
};
this["sb" + i].onRelease = function ()
{
sName = new String(this._name);
sNum = sName.substr(2, 2);
getURL("product.asp");
};
this["s" + i].onEnterFrame = function ()
{
var _l2 = _global;
var _l1 = this;
sName = new String(_l1._name);
sNum = sName.substr(1, 2);
if (mainNum == _parent.main && sNum == _l2.subChk && _l2.subOver == 0)
{
_l1.nextFrame();
}
else if (sNum != _l2.subOver)
{
_l1.prevFrame();
}
else if (sNum == _l2.subOver)
{
_l1.nextFrame();
} // end if
};
} // end of for
stop();
要在哪里加链接呢? 我试了在原件上加按钮原先鼠标放上去显示另一张图就出不来了,求解......
不是按钮里,是元件里有代码,整个FLASH没有按钮 展开
1个回答
展开全部
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询