DelayedCallTimeout.as

Go to the documentation of this file.
00001 import mx.utils.Delegate;
00002 
00003 //TODO: should be revised
00004 class gugga.utils.DelayedCallTimeout {  
00005         private var interval:Number;
00006         private var args:Array;
00007         private var obj;
00008         
00009         public function DelayedCallTimeout (time:Number, objInst, func:Function) {      
00010                 args = arguments.splice(3);
00011                 interval = setInterval(Delegate.create(this, solve),time, func);
00012                 obj = objInst;
00013         }
00014         
00015         private function solve (func:Function):Void {
00016                 clear();
00017                 func.apply(obj,args);
00018         }
00019         
00020         public function clear ():Void {
00021                 clearInterval(interval);
00022         }
00023 }

Generated on Fri May 11 17:12:42 2007 for GuggaFramework by  doxygen 1.5.2