troubleshooting Question

Add a hyperlink to flash

Avatar of TKD
TKD asked on
CSSHTML
1 Comment1 Solution1187 ViewsLast Modified:
Hi,
I would like to add hyperlink to flash. At first, I create a  "background" div and use SWFObject to embed a Flash movie into "background" div. Then I create a "go_to_main" div and insert a hyperlink into this div.
So when user clicks the area of flash, it can go to the other homepage.
This function can work in FireFox, but not work in IE 6.0. Why???
Any help will be appreciated.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
*, html, body
{
    margin: 0; padding: 0;
    font-size: 10pt;
    letter-spacing: 1pt;
    line-height: 14pt;
    font-family: arial;
    color:#fff;
}
 
/* centrovanie */
body, html
{
    height: 100%; width: 100%;
    top: 0; left: 0;
    position: absolute;
    background-color:#000;
}
/* centrovanie */
div#center
{
    border: 0px;
    margin:  auto;
    position: absolute;
    top: 50%; left: 50%;
}
 
div#background
{
    position: relative;
    margin: 0;
    width: 950px; height: 550px;
    
 
/* centrovanie */
    position: absolute;
    left: -475px; top: -275px;
    top:expression(document.body.clientHeight > 550 ? "-275px" : ( - document.body.clientHeight / 2) + "px");
}
 
div#go_to_main 
{	
	position:absolute; 
	width:100%; 
	height:100%; 
	z-index:100; 
    left: -475px; top: -275px;
    top:expression(document.body.clientHeight > 550 ? "-275px" : ( - document.body.clientHeight / 2) + "px");
 
}
</style>
<script type="text/javascript" src="js/swfobject.js"></script>
<title>Studio</title>
 
</head>
<div id="center">
	<div id="background" style="z-index:1;">
    </div>
    <div id="go_to_main">
        <a style="display:block;width:950px; height:550px;text-decoration:none;" href="main.html">Flash</a>
    </div>
<script type="text/javascript">
   var so = new SWFObject("index.swf", "mymovie", "950", "550", "8", "#000000");
   so.addParam("wmode", "transparent");
   so.write("background");
</script>
</div>
 
<body> 
</body>
</html>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros