title: How could i make this function sleep for a certain amount of time?
body: <p>So here's my problem. I have code set up that calls a function whenever my player is over its last destination in the a* pathfinding array... </p>
  
  <pre><code>public function rakeSoil(e:Event):void {
  
       var:Cell = Grid.getCellAt(player.x/50, player.y/50);
  
       if (cell.isWalkable == false) {
           return;
       else {
  
       //here is where i want to do the sleep code so this doesnt happen straight away? If possible.
  
       target.sprites = [grass];
  
       } 
   }
  </code></pre>
  
  <p>thanks guys :)</p>