2012-08-27 44 views
0

如何檢測事件在as2中觸發的movieClip。我製作了一個重複的動畫片段列表,並希望在每個動畫片段上添加點擊事件,並區分哪個動畫片段事件具有更多的事件。我知道as3的解決方案,但需要as2解決方案。請幫忙。確定as2中的event.target

回答

0

在AS2中,當你分配一個函數使用說myButton.onRelease = myFunction;,在函數內部,你可以參考簡單地使用this來電:

function myFunction() { 
trace(this._name); 
} 

myButton.onRelease = myFunction; // will trace "myButton" when you click it 
+0

感謝您的幫助.. – Meghanshi