[問題] 請問製作選單的新開視窗語法~mainMenu[4] = "/community/ind

看板Flash作者 (聽你說過)時間18年前 (2007/07/18 12:52), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串1/1
我是套用現成的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

07/18 12:56, , 1F
_blank
07/18 12:56, 1F
※ 編輯: turgo 來自: 211.74.135.217 (07/18 13:25)

07/18 13:25, , 2F
抱歉~已修正
07/18 13:25, 2F
文章代碼(AID): #16dPoX0E (Flash)
文章代碼(AID): #16dPoX0E (Flash)