作者turgo (听你说过)
看板Flash
标题[问题] 请问制作选单的新开视窗语法~mainMenu[4] = "/community/ind
时间Wed Jul 18 12:52:48 2007
我是套用现成的FLASH档案制作
在修改语法的部分出了问题
想请教一下 一排选单其中一项按钮
要新开视窗的方法
以下为原始语码:
if (route == 1) {
link = "";
} else {
link = "";
}
menu_on(pageNum);
mainMenu = [];
mainMenu[0] = "
http://tw.yahoo.com/";
mainMenu[1] = "
http://tw.yahoo.com/";
mainMenu[2] = "
http://tw.yahoo.com/";
mainMenu[3] = "
http://tw.yahoo.com/";
mainMenu[4] = "
http://tw.yahoo.com/";
subMenu = [];
for (var i = 0; i<mainMenu.length; i++) {
subMenu[i] = [];
}
for (var i = 0; i<mainMenu.length; i++) {
this["menu"+i].no = this["sub_bar"+i].no=i;
this["menu"+i].onRollOver = function() {
menu_on(this.no);
};
this["menu"+i].onRollOut = function() {
menu_off(this.no);
};
this["menu"+i].onRelease = function() {
getURL(link+mainMenu[this.no], "_self");
};
this["menu"+i].onEnterFrame = function() {
if (this.chk == true) {
this.nextFrame();
} else {
this.prevFrame();
}
};
this["sub_bar"+i].onEnterFrame = function() {
if (this.chk == true) {
this.nextFrame();
} else {
this.prevFrame();
}
};
}
MovieClip.prototype.xWidth = function(mc, speed, tx) {
mc.onEnterFrame = function() {
this._width += speed*(tx-this._width);
};
};
function menu_on(num) {
this["menu"+num].chk = true;
this["sub_bar"+num].chk = true;
if (num != pageNum) {
this["menu"+pageNum].chk = false;
this["sub_bar"+pageNum].chk = false;
}
}
function menu_off(num) {
this["menu"+num].chk = false;
this["sub_bar"+num].chk = false;
menu_on(pageNum);
}
我本来是做mainMenu[4] = ("
http://tw.yahoo.com/","_blank");
结果还是在原视窗开启
拜托一下~教教我吧...感谢~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 211.74.135.217
1F:推 pm2001:_blank 07/18 12:56
※ 编辑: turgo 来自: 211.74.135.217 (07/18 13:25)
2F:推 turgo:抱歉~已修正 07/18 13:25