HighDots Forums  

How to make a Layer 'close' after 10 seconds?

alt.html.dhtml alt.html.dhtml


Discuss How to make a Layer 'close' after 10 seconds? in the alt.html.dhtml forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike Mella
 
Posts: n/a

Default How to make a Layer 'close' after 10 seconds? - 01-27-2005 , 06:51 PM






Hi.
I have this:
http://canadalawbook.ca/layer/index.html
....It's a Flash movie (with a button that links to a site) with a
transparent background in an absolute-positioned div with a z-index of
1. Here's the relavent code:


<div id="Layer1" style="position:absolute; width:387px; height:245px;
z-index:1; left: 227px; top: 124px">
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="550" height="400" id="ad" align="">
<param name=movie value="ad.swf">
<param name=quality value=high>
<param name=wmode value=transparent>
<param name=bgcolor value=#FFFFFF>
<embed src="ad.swf" quality=high wmode=transparent bgcolor=#FFFFFF
width="550" height="400" name="ad" align=""
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
</div>


There, the Flash animation repeats, but I actually want it to play once
and then go away. I did that, but after the animation was gone -- in
non-IE browsers -- there was still an 'invisible window' where it used
to be, and the mouse couldn't access anything under it, like links.

Is there a way to make the layer 'expire' after a few seconds, so that
the page appears as it normally would once the animation is done?
In the end, I'll probably be using static images in the layer instead of
Flash animations, if that helps.
Thanks a lot.
--Mike

Reply With Quote
  #2  
Old   
Woolly Mittens
 
Posts: n/a

Default Re: How to make a Layer 'close' after 10 seconds? - 02-02-2005 , 12:06 AM






Mike Mella wrote:
Quote:
Is there a way to make the layer 'expire' after a few seconds, so that
the page appears as it normally would once the animation is done?
In the end, I'll probably be using static images in the layer instead of
Flash animations, if that helps.
Thanks a lot.
--Mike
You can call a javascript function in the page from the Flashmovie, but
I'm assuming you don't have access to it's source-code.

If you want to get rid of the floating layer try one of these:

<script type="text/javascript">
var objLayer = document.getElementById('theidofmylayer');
var objTimeout = setTimeout("objLayer.style.left='-3000px'",10000);
</script>


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.