在一个有鼠标放到一个元件上显示另一张图片的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没有按钮
展开
 我来答
hhuujx
2012-02-16 · TA获得超过186个赞
知道小有建树答主
回答量:288
采纳率:0%
帮助的人:205万
展开全部
在for循环里加上这个东西
_root["menu" + i].onPress= function ()
{
getURL("http://www.baidu.com");
}
能明白吗
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式