public static function sleep(ms:int):void {
var init:int = getTimer();
while(true) {
if(getTimer() - init >= ms) {
break;
}
}
}
sleep(5000);
private _abilityTimer:Timer = new Timer(ms);
public function startAbilityLoop() : void
{
_abilityTimer.Start();
//timer should have a event in which u can invoke a function each iteration i dont quite remember been a while
}