作者royal3501 (小心)
看板Flash
標題[問題] as3 function 裡面的this?
時間Wed Oct 27 05:08:50 2010
請問一下
假設我在stage上拉了個名稱"test"的影片元件
然後as3 我可以用this["test"]抓到他
但在第2層以後的function卻抓不到了(undefined)?
ex.
function foo1(){
trace(this["test"]); V
function foo2(){
trace(this["test"]); X
}
}
那這些this是指什麼呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.122.232
1F:推 etrexetrex:你可以寫 trace( this ); 10/27 08:16