Re: [問題] 使用的movieclip為變數時 要怎麼呼叫쌠…

看板Flash作者 (achilles)時間19年前 (2007/01/13 20:08), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串2/4 (看更多)
※ 引述《gargouille (lol)》之銘言: : ※ 引述《achilles03 (achilles)》之銘言: : : 在使用 movieclip.swapDepths(100)的時候 : : movieclip一定要是固定的名稱嗎? : : 因為我現在有好多個movieclip, : : 必須等待回傳是哪個movieclip才決定使用哪個movieclip : : 所以想請問有人知道如何讓movieclip能夠動態的由變數決定? : 假設你存回傳值為 target_mc:string : this[target_mc].swapDepths(100); : this 可更換為其他的路徑 請問 target_mc:string 是什麼意思? 我把它理解成 tmp_target="_root."+mc this[tmp_target].swapDepths(100) 還是不行 是那裡錯了呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.138.202

01/13 20:16, , 1F
那是變數,你也可以寫成 this[a]啊,a就是你設的mc
01/13 20:16, 1F

01/15 17:12, , 2F
謝謝
01/15 17:12, 2F
文章代碼(AID): #15gClHRU (Flash)
討論串 (同標題文章)
文章代碼(AID): #15gClHRU (Flash)