Audio playing before scene is fully loaded

I have an intro scene with a video. The problem is that the audio starts playing before the video is fully loaded, so the entire thing is completely out of sync… Here is the part of the code that SHOULD sync the video and the audio (js):

var IntroTexture : MovieTexture;

function Start ()
	{
	while(!IntroTexture.isReadyToPlay)
		{}
	IntroTexture.Play();
	gameObject.audio.Play();
	}

Now, from what I can tell, the IntroTexture.isReadyToPlay turns true as soon as the scene is loaded, so the audio starts playing immediately. But the video takes a few extra seconds (random according to the load time of the scene) to start playing. Any help would be very much appreciated.

What you need is a Coroutine.

function Start ()
{
    LoadAndPlayVideo();
}

function LoadAndPlayVideo()
{
    while(!IntroTexture.isReadyToPlay)
    {
        yield;
    }
     IntroTexture.Play();
     gameObject.audio.Play();
}