View Full Version : Close out player on video completion

02-28-2008, 04:28 PM
I have a transparent flash video player on a site, but when the video finishes it covers the links underneath it. Is there any way to have the flash player close out completely to re-expose the links underneath?
I am using the swfobject to insert the video and use a separate play button (image) to activate. I do have flash 8 if some coding is needed there but I am weak on action script and would need help. Can I do this in html?
Here's the coding that is on the html page below.
I will post this in html forum as well. Thanks in advance.

<div class="video">
<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">

<script type="text/javascript">

function writeMovie()
var so = new SWFObject("video5.swf", "video5", "480", "360", "8", "#336699");
so.addParam("quality", "high");
so.addParam("wmode", "transparent");
so.addParam("salign", "lt");
<div id="Layer4">
<img src="playbutton.gif" onclick="writeMovie()" alt="Click To Video">

02-29-2008, 07:47 AM
Just a note, double posting is not allowed, so just be careful of that in the future.

Ok so basically you will need to have a piece of actionscript play at the end of the video, which will call a javascript function that will take the DIV which the player is inside and hide it. You could use some AJAX functions to replace the DIV with the old content as well.

If your movie is embedded in the timeline then just put some actionscript at the end. Otherwise you will need some more complicated actionscript to determine when the video is over, and I would need to know more about your player setup I think.

Here is some info, and more is out there if you google it: