看板 Flash 關於我們 聯絡資訊
※ 引述《Walkup (am 4:07)》之銘言: : 最近在做一個小玩意,仔細的碰到了很多Timer的東西, : 但我發現好像不管是在Flash還是Flex4底下做都一樣。 : 就是啊,我宣告了一個myTimer後 : 偵聽TIMER和TIMER_COMPLETE的事件 : 我設定讓他Timer(1000,3) : 每秒跑一次TIMER的event,每三秒跑TIMER_COMPLETE的event, : 然後每三秒myTimer.reset() : 我trace過,只要reset後,我沒有移除任何偵聽,他就不會再trace每秒觸發的event! : 很怪,不知道各位大大有何解? ============ adobe live doc ================== reset():void 的說明:: Stops the timer, if it is running,and sets the currentCount property back to ^^^^^^^^^^^^^^^^ 原因應該是這個 0, like the reset button of a stopwatch. 我想是被Stop了,再下 start()才會再啟動....O_o 若是沒下 reset , 因為你的 repeatCount 設 3 , 跑3次(1000 ms x 3)後, 它應該還是會stop......XD -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.120.1.136 ※ 編輯: Lawnchern 來自: 59.120.1.136 (04/08 11:39) ※ 編輯: Lawnchern 來自: 59.120.1.136 (04/08 11:41)
Walkup:哈哈!原來,因為我主要是reset後重計currentCount,所以沒 04/08 20:33
Walkup:注意到Stops the timer這一句XDDD 04/08 20:34