what is the problem ?
how Timer work that the loop stuck in the program????????????
I cant understand the loop and Timer increase cpu usage??????
var forsate,generalFlag :Boolean;
var counter:int;
var generalTimer:Timer = new Timer(1);
testhalgheh()
generalTimer.addEventListener(TimerEvent.TIMER,generalfunc);
function generalfunc(e:TimerEvent=null):void
{
generalFlag=true;
//trace( " generalFlag " + generalFlag)
}
function testhalgheh():void
{
generalTimer.start();
while(counter<1000)
{
if(generalFlag==true)
{
trace("hello")
counter+=1;
}
}
}
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders