Dear Friend
hi
1) I dont know why the timer counter slow down when the loop start
working?
how can i solve it
2)
My bigest Problem is , why flash speed goes down , during this program, Is this
correct that some people said flash can not do more than one thing in same
time? other languages like vb has the property applicationdoevent , that it
update event and timers,or other process doesent affect each other , but in
flash if u see hthe proccess has affect on each other , the cpu usage goes up ,
frame rate goes down ....
how can i solve it, is there equal instruction (applicationdoevent in vb
)that we can do it in as3?
please help me
code:
import flash.utils.Timer;
import flash.events.TimerEvent;
var a:int=0
var timer1:Timer=new Timer(1)
timer1.start()
timer1.addEventListener(TimerEvent.TIMER,Func_time1)
function Func_time1(e:TimerEvent):void
{
timer1txt.text=String(e.target.currentCount)
e.updateAfterEvent();
}
//trace(timer1.running)
btn1.addEventListener(MouseEvent.CLICK,clickwhile)
function clickwhile(e:MouseEvent):void
{ a=0
whiletxt.text=""
while(a<200000)
{
whiletxt.text="loop_Number="+String(a);
a++
}
}
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders