Solved

How to position Flash using swfobject.embedSWF?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Is there an event to update the text when user types in textbox? 6 41
jQuery detect if it is a mobile device 3 90
Sums of coloumns in html/java 15 64
HTML Relative path 9 28
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

948 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

22 Experts available now in Live!

Get 1:1 Help Now