all groups > flash (macromedia) > september 2007 >
You're in the

flash (macromedia)

group:

Understanding SWF Object



Re: Understanding SWF Object DMennenoh **AdobeCommunityExpert**
9/13/2007 3:58:08 PM
flash (macromedia): [quoted text, click to view]

yes.

[quoted text, click to view]

That goes in the head, not body. The rest goes in body.

[quoted text, click to view]
need to change be var so = new SWFObject("movie.swf".....

changed to var so = new SWFObject("index.swf", ....

Yes.

[quoted text, click to view]
Is there anything else I need to change ( I know to change the movie size
and
Flash version)

You don't need to change 'mymovie' to anything... it's the id of the movie
if you're using liveconnect. Read the docs on the SWFObject site.

Yes, you need the quotes. Try it without... Change the size to match the
size of swf file... and the color determines the background color of your
movie. Again, this in in the docs on the site for SWFObject.


--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

Understanding SWF Object Katewel
9/13/2007 7:10:53 PM
Hi,

You'll have to bear with me as I have no programming experience whatsoever.
I'm trying to embed the SWF Object so that Flash files work properly in
Internet Explorer. So I upload the swfobject.js file to my host correct? Do I
put the following code in the body of my html?

<script type="text/javascript" src="swfobject.js"></script>

<div id="flashcontent">
This text is replaced by the Flash movie.
</div>

<script type="text/javascript">
var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8",
"#336699");
so.write("flashcontent");
</script>

So say my movie is index.swf placed in an index.html file. Would the code I
need to change be var so = new SWFObject("movie.swf".....

changed to var so = new SWFObject("index.swf", ....

What do I change "mymovie" to and do I need the quotation marks?
Is there anything else I need to change ( I know to change the movie size and
Flash version)

I hope you can understand my questions.

Thanks in advance

KK
Re: Understanding SWF Object dzedward
9/13/2007 7:31:11 PM
what it should look like:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Your Title</title>
<script type="text/javascript" src="swfobject.js"></script>
</head>
<body bgcolor="#ff0000">
<div id="flashcontent">
<strong>You need to upgrade your Flash Player</strong>
</div>

<script type="text/javascript">
// <![CDATA[

var so = new SWFObject("yourSWFFile.swf", "SWFid", "1000", "1000", "8",
"#FF0000");
so.useExpressInstall('expressinstall.swf');
so.write("flashcontent");

// ]]>
</script>
</body>
</html>
AddThis Social Bookmark Button