Preloading videos when using netstream?

Hi everyone,
Thanks for taking a look at this post. I am wondering about how to preload some videos using the NetStream object. I am trying to build a header for a website that will contain 4 short videos. There are actually 12 possible videos that can be selected. 4 of them are randomly chosen. Not any video can be loaded in any slot, however. The videos will attempt to be paired w/ the colors that go best with that slot. Therefore my XML file contains sections of acceptable videos for slot 1, 2, etc. Once the 4 videos are chosen, the first video should play between 5-10 seconds (a timer is set w/ a random value between 5-10) after they are loaded. After the first video plays there is supposed to be another random pause of a few seconds and then the next video will play. This continues till all 4 videos have played in a random order. The hope was that it would look like the still images at the top of the page came to life. The video clips are going to be subtle things involving nature, such as grass blowing or buffalo grazing. I have been working on a “proof of concept” with any videos i could find laying around and that is posted at http://demo.djcase.com/header.html

I have a few problems so far. My biggest problem is that i’ve only used flash a few times before and it was a long time ago. Currently i can’t find any event that fires to tell me when a stream is done playing a video, or a property that can dynamically tell me how long the video clip is. Because of this, my timers to control the pause after a video plays has to try to include the time that the video is playing too. This isn’t ideal to say the least. Is there a way to preload the videos using the netstream object? Currently all the videos are being loaded at once, and being paused after seeking the first keyframe. This allows the first frame to show thru as tho it were just a still image. I am open to advice on restructuring thing completely if there is a better way. The doc class is attached to the post. The FLA is just blank, so thats the only code there is. Thanks for looking.