[問題] as檔案
最近在試著寫as檔
想要簡單做一個時鐘在as中
再用fla去呼叫類別進來
package {
public class CLOCK {
public function O_clock(Object0,Object1,Object2){
//0:時針 1:分針 2:秒針
var my_Date= new Date();
var CLOCK_hours=my_Date.getHours();
var CLOCK_min=my_Date.getMinutes();
var CLOCK_sen=my_Date.getSeconds();
Object0.x=Object1.x=Object2.x=400;
Object0.y=Object1.y=Object2.y=50;
Object0.rotation=CLOCK_hours/2*30-90;
Object1.rotation=CLOCK_min*6-90;
Object2.rotation=CLOCK_sen*6-90;
}
}
}
但是現在想試著用setTimeout 或是 setInterval 去跑時間
但是用在as檔裡面他完全沒反應!
如果寫在fla卻可以!!
不知道能不能夠直接寫在as檔之中!?
有試過import flash.utils.* 但還是不給面子
麻煩各位大大了 orz
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.35.12.10
→
12/02 00:52, , 1F
12/02 00:52, 1F
→
12/02 03:22, , 2F
12/02 03:22, 2F
→
12/02 08:47, , 3F
12/02 08:47, 3F
→
12/02 08:49, , 4F
12/02 08:49, 4F
推
12/02 13:41, , 5F
12/02 13:41, 5F
→
12/02 22:49, , 6F
12/02 22:49, 6F
討論串 (同標題文章)