Use a coroutine.
http://docs.unity3d.com/ScriptReference/WaitForSeconds.html
You have to call your function like this : StartCoroutine(YouFunctionName()).
The function called must be a IEnumerator, and you put the time to wait in the WaitForSeconds function.
Here's an example based on your code.
public function PlayRecording(){
for(var i:int = 0; i >Do what you want
}
Please check answered if this helped ;)
Trending Articles
More Pages to Explore .....