看板 Flash 關於我們 聯絡資訊
^^"有個問題想來這發問,請高手教一下,因為一直想不通。 var testNumA : Number = 0; var testNumD : Number = 0; function testFunB(){ for (testNumA=1;testNumA<=x;testNumA++){ this["test"+testNumA].onRelease = function (){ testNumD = this["test"+testNumA].testNumA testFunE() } } } function testFunE(){ for (i=0;i<y;i++){ testWord_txt.text = ["xxx"+i+"_Array"][testNumD].xxxxx } } ^^"想請問,因為上面是我原本寫錯的方式,要如何才能夠將 this["test"+testNumA].onRelease的testNumA的值 代入testNumD呢? 麻煩各位,謝謝。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.135.178.144
scars:你好像沒有指定 this["test"+testNumA].testNumA 的值啊 08/11 19:56
icedesign:= = 意思是說,要先指定嗎?可以教我一下嗎?高手^^ 08/12 00:04
scars:其實你的程式蠻微妙的 我看不出來你要幹嘛XDD 08/12 13:10
scars:在 onRelease 函數的前面你要先 08/12 13:11
scars:this["test"+testNumA].testNumA=testNumA 08/12 13:12
icedesign:^^感謝!真的發現是自己寫錯嚕~3Q 08/12 14:20