Link to home
Start Free TrialLog in
Avatar of Aspirin99
Aspirin99

asked on

How to position Flash using swfobject.embedSWF?

How do I set the absolute position (from top and left) and z-index of my two flash files that I'm embedding in the attached code?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
<title>SWFObject 2 dynamic embed multiple SWFs</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
		swfobject.embedSWF("typewriter.swf", "myTypewriter", "200", "251", "8", "expressInstall.swf");
		swfobject.embedSWF("Name.swf", "myName", "300", "75", "8", "expressInstall.swf");
		</script>

</head>


<body>


<div id="myName">
	<h1>Alternative content - My Name</h1>
 	<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
		</div>
        
<div id="myTypewriter">
	<h1>Alternative content - My Typewriter</h1>
		<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
		</div>

</body>
</html>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Joshua_Peters
Joshua_Peters
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Aspirin99
Aspirin99

ASKER

I figured it out. The trick is not to know the div tag-- I know that. The trick is that I needed to put the Div tag for the flash into another div tag container--a container within a container like:

<div align="center" style="position:absolute; top: 4px; clear:both; left: 75px; z-index: 0">
<div id="myName">
                  <h1>Alternative content - My Name</h1>
                  <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
            </div>
</div>

None the less, I'll give you the points. Thanks for responding.
Thanks