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首頁
搜尋此網誌
熱門文章
- 思考,快與慢 Thinking, fast and slow (快思慢想)
- 利用7-11 iBon列印A3相片
- 2010漫步歐洲-00a Taipei-Bankok-Doha-Paris 台北-曼谷-杜哈-巴黎
- 2010漫步歐洲06a From Florence to Cinque Terre 從佛羅佛斯到五鄉地
- 哈佛幸福課 #21~#23自尊,課程總結 積極心理學 Harvard Positive Psychology
- Blogger 新功能 動態檢視 Dynamic Views
- 2010漫步歐洲03d Rome: Streets 羅馬街道
- 透過Google Checkout 直接對日本紅十字會捐款 (義援金)
- 2010漫步歐洲05b Florence: Basilica di Santa Maria del Fiore 聖母百花大教堂
- 讀書筆記 Your Brain at Work (1)
沒有留言:
張貼留言