I have this function in my page:

<body onload="javascript:window.document.player.GotoFrame(2);">

It does a good job but if someone has slower internet and the flash object isn't fully loaded then the object is stuck on the first frame instead of where I tell it to go because the frames aren't loaded at the time the function is executed.

Is there any way to wait for the flash object to load all its frames before I execute the script?