Z's Blog

Design Life Style

顯示具有 Flash 標籤的文章。 顯示所有文章
顯示具有 Flash 標籤的文章。 顯示所有文章

2008年6月30日

Flash event handling

function eventResponse(eventObject:EventType):void { // Actions performed in response to the event go here. } eventSource.addEventListener(EventType.EVENT_NAME, eventResponse); Event handling 三要素: 事件來源物件 發生的事件 回應的物件 首先定義一個function,預備當事件發生的時候,就執行它。 然後在來源物件上,加上addEventListener, 發生事件的時候,就呼叫前面定義好的function.

返回Z's Blog首頁