Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hide div once finished 1

Status
Not open for further replies.

TheCandyman

Technical User
Sep 9, 2002
761
US
I'm trying to hide a div that contains a flash into so once it plays it completely closes. Currently it plays but the menu behind it are unusable so i need to completely hide it. Once i get it working I'll make the flash so it only plays once per visit. Any ideas?

 
Yes - using Flash, you can run JS on the page, so you could write a function on the page to hide the DIV, and then call that from Flash.

There are probably many ways of calling JS from Flash, but I normally use the JS/Flash kit. I'd ask in the Flash forum for more on how to call JS.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
FYI to anyone who may come later looking for an answer to this:


On the last frame of your Flash video use:
Code:
onFrame (131) {
    getURL("javascript:HideDiv();");
}

In Header of the HTML page:
Code:
<script type="text/javascript">
	function HideDiv()
		{
			document.getElementById("Flash").style.display='none';
		}
</script>

In the body of the HTML page:
Code:
<div id="Flash"> 
            ........
            ........	
</div>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top