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首頁
搜尋此網誌
熱門文章
- 哈佛幸福課 #1~#3 簡介 積極心理學 Harvard Positive Psychology
- HBR 2011 五月號 The Power of Small Wins 小勝的力量
- 2010漫步歐洲03f Rome: Piazza Navona 納沃納廣場
- 思考,快與慢 Thinking, fast and slow (快思慢想)
- 如何閱讀一本書 How to read a book
- 哈佛幸福課 #21~#23自尊,課程總結 積極心理學 Harvard Positive Psychology
- Firefox 的 Flash 不能正確載入問題
- 哈佛幸福課 #3~#5 幸福課的五個基礎 積極心理學 Harvard Positive Psychology
- 遇見極光
- 世界最大的木結構建築 Metropol Parasol (都會傘)
沒有留言:
張貼留言