Solved

How to position Flash using swfobject.embedSWF?

Posted on 2010-09-11
3
1,138 Views
Last Modified: 2012-05-10
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

0
Comment
Question by:Aspirin99
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
Joshua_Peters earned 500 total points
ID: 33655706
Just do something like this for each one.
<div style="position: absolute; left: 610px; top: 80px; height: 400px; width: 100px; padding: 1em;">

</div>

Open in new window

0
 
LVL 1

Author Comment

by:Aspirin99
ID: 33656301
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.
0
 
LVL 1

Author Closing Comment

by:Aspirin99
ID: 33656305
Thanks
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question