PDA

View Full Version : How to Hide flash movie inserted in html after it has finished playing


Freedomaswell
05-30-2005, 06:58 PM
Hello,
we have a client that has sent us a tv ad, that we have converted into flash. We want to publish it in the website's home, and make it dissapear just when the video has finished (20 seconds), by just hiding itself, or maybe narrowing a table or so. We are not sure of what it is usually used in this cases.

After this, a gif file of the advertiser should be shown.
It is something like i.e. Yahoo does in Yahoo! home with videos.
Do you know what should we use/do? How?
Maybe using a layer and make it dissapear or using DHTML.
Well, I ask for your advice, thanks a lot.


What I have usually seen is like a video window that closes itself progressibely making the part that is under the video - in the html column - go up until the video window is totally closed.
Any idea?

Boskic.com
06-01-2005, 05:21 PM
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>
<title>Test</title>
<script type="text/javascript">
function Hide(id) {
document.getElementById(id).style.display='none';
}
</script>
</head>

<body>
<div id="Flash">
<object type="application/x-shockwave-flash" data="index.swf" width="100%" height="100%">
<param name="movie" value="index.swf">
<param name="scale" value="noscale">
<param name="bgcolor" value="#000000">
<param name="menu" value="false">
<param name="quality" value="high">
Please install <a href="http://www.macromedia.com/go/getflashplayer" target="_blank">FLASH plugin</a>.
</object>
</div>
</body>

</html>
getURL("javascript:Hide(\'Flash\');void(0)");
at end of movie (last frame).

Freedomaswell
06-02-2005, 09:44 AM
Well, I haven't tested the movie yet but, thanks! I'll let you know how it works for me
;)

Freedomaswell
06-02-2005, 09:51 AM
The code is great. As I already told you what I was looking for. To go deeper,.. is there any way to make it dissapear progressively, just like narrowing the layer until it disappear, for example?

Boskic.com
06-02-2005, 11:54 AM
Modifying Hide function by adding a timer and a code for change of height and width of in this case div with Flash id ...