All I get is: This text is replaced by the Flash movie.

3,810 views
Skip to first unread message

whatobject

unread,
May 2, 2009, 7:30:23 AM5/2/09
to SWFObject
followed the instructions, all browsers just display text content of
the div

Where am I going wrong?

Jimbo

unread,
May 2, 2009, 7:34:20 AM5/2/09
to swfo...@googlegroups.com
Probably here: "followed the instructions" - if you can post a link to the page that you are testing, we can probably spot your error(s) quickly.

jimbo

*********** REPLY SEPARATOR ***********
n

whatobject

unread,
May 2, 2009, 7:40:13 AM5/2/09
to SWFObject
:) The instructions were disturbingly simple

heres the page:

http://skiagrafa.com/artflash.html

Jimbo

unread,
May 2, 2009, 7:47:23 AM5/2/09
to swfo...@googlegroups.com
First off, you are using the flash default embed, not swf object:
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>

You should be embedding the swfobject.js file instead of Adobe's RunActive Content, as the instructions suggest.

If you are using the Dyanamic Embed method, so that only the alternative content div is placed in the body, you need the dynamic content script in the head of your document. Are you sure you followed the swfobject instructions?

http://code.google.com/p/swfobject/

If you use the generator, it will create all the code you need, you can just copy and paste it into your document.
hth,
jimbo

*********** REPLY SEPARATOR ***********

a

whatobject

unread,
May 2, 2009, 8:54:37 AM5/2/09
to SWFObject
Thanks for the advice Jimbo, the DW residue wasn't helping. I have
placed the code in a new blank page and I get the same result??

http://www.skiagrafa.com/swftest.html

It's calling swfobject.js which is on the root along with the html and
the swf

any ideas?

whatobject

unread,
May 2, 2009, 8:58:29 AM5/2/09
to SWFObject
makes no difference if alternative content div is placed in the body
or not, same when I preview locally
Message has been deleted

Jimbo

unread,
May 2, 2009, 9:10:26 AM5/2/09
to swfo...@googlegroups.com
Sorry, I was away for a bit.
1. You are using swfobject.js version 2.1 - this is good
2. Your embed code is from swfobject 1.5 - this is not good

- Your alternative div id must match the title (mymovie) in your embed code, and it does not
- Your alternative content div is in your head - it must be in your body

This is the code you want to use:

--------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="swfobject.js"></script>

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

<script type="text/javascript">
var flashvars = {};
var params = {};
var attributes = {};
swfobject.embedSWF("movie_arts3.swf", "mymovie", "400", "200", "8.0.0", false, flashvars, params, attributes);
</script>
</head>

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

---------------------------------

*********** REPLY SEPARATOR ***********

On 5/2/2009 at 6:00 AM whatobject wrote:

makes no difference if alternative content div is placed in the body
or not; same result

On May 2, 12:47 pm, "Jimbo" <j...@jimbo.us> wrote:
e

Jimbo

unread,
May 2, 2009, 9:15:30 AM5/2/09
to swfo...@googlegroups.com
Wait a minute, I forgot to remove your old 1.5 code - this is the correct code:

*********** REPLY SEPARATOR ***********

On 5/2/2009 at 9:10 AM Jimbo wrote:

Sorry, I was away for a bit.
1. You are using swfobject.js version 2.1 - this is good
2. Your embed code is from swfobject 1.5 - this is not good

- Your alternative div id must match the title (mymovie) in your embed
code, and it does not
- Your alternative content div is in your head - it must be in your body

This is the code you want to use:

--------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">

whatobject

unread,
May 2, 2009, 9:16:43 AM5/2/09
to SWFObject
I see. I guess the code samples in the instructions aren't relative to
the current version. Thanks for the code, I have also acheived the
desired result using the generator, which has helped me see the
correct way to add the code. but I will play with your code because I
want to learn this properly. Thanks again for all your help!
Reply all
Reply to author
Forward
0 new messages