Re: [問題] AS3的計時器
用法大致就是這樣
var timer:Timer = new Timer(1000); //1000ms發出一次Timer事件
timer.addEventListener(TimerEvent.Timer, tick);
timer.start();
function timer(e:Event):void {
//your code here
}
比setInterval()好用太多
--
CJ Cat = Croa'J Cat = Cockroach Cat = 西街凱特 = 蜚蠊貓 = 蟑螂貓
Blog http://cjcat.blogspot.com
Gallery http://cjcat2266.deviantart.com
ptt2 Board CJWorkshop - 阿多比閃光(Adobe Flash)研討區
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.33.163
推
06/13 15:17, , 1F
06/13 15:17, 1F
→
11/27 11:58, , 2F
11/27 11:58, 2F
討論串 (同標題文章)