Solved

How to position Flash using swfobject.embedSWF?

Posted on 2010-09-11
3
1,123 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

762 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now