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.
訂閱:
張貼留言 (Atom)
返回Z's Blog首頁
搜尋此網誌
熱門文章
- 利用7-11 iBon列印A3相片
- 思考,快與慢 Thinking, fast and slow (快思慢想)
- 2010漫步歐洲03f Rome: Piazza Navona 納沃納廣場
- 2010漫步歐洲03b Rome: Roman Forum 古羅馬廣場
- 鋁陽極處理,氧化鋁膜致使表面偏色之問題分析
- 2010漫步歐洲-01i: Mont St. Michel 聖米歇爾山(2)
- 2010漫步歐洲-01e Paris: Eiffel Tower 艾菲爾鐵塔
- 2008 七月隨手拍
- 2010漫步歐洲07a Milan: From Cinque Terre to Milan 從五鄉地到米蘭
- MIT OCW 9.00 心理學筆記 Lec. 8 Using the Mind
沒有留言:
張貼留言