View Full Version : mediaDisplay help

08-26-2005, 03:23 PM
Quick question:

I have swf that is essentially a flv player. I have about 18 videos that users can choose from. I am using the MediaDisplay/MediaController combo as my player. I have 18 buttons--one for each video. When I click on the buttons the corresponding video plays in the player... simple enough. Here's the code for that:
on(release) {this.flvDisplay.setMedia("videos/video1.flv");}

So everything works great, except one thing. Once the video has finished, and I click on another button to view another video, the new video starts in a PAUSED state. So I added this line of code to my on(release) event and it fixed the problem.

Now the only problem is that the new video plays perfectly but the MediaController shows the video as still be paused. I think I could write a boolean statement something like this, but I don't know how to tell the MediaController to change its status.
if(flvDisplay.playing == true){some function;}

Maybe the boolean idea is not needed and I just need to replace the "flvDisplay.play(0)" with something better... maybe something that clears the "buffer" or something? Any suggestions? thanks in advance.

08-26-2005, 03:59 PM
easier than I thought...

on(release) {
if (flvDisplay.playing == true){
flvController.playing = true;