SWFObject and Google Sites

221 views
Skip to first unread message

Kluger

unread,
Apr 30, 2012, 1:03:44 PM4/30/12
to SWFObject
Hello,
I have used SWFObject v2.0 HTML and Java Script generator to create
the code for an SWF. When I open the code using Chrome, the SWF loads
properly. Now I am trying to embed the SWF inside a Google Sites page.
I am trying two ways. The first is by clicking on the <HTML> button
that appears on the 'Edit' menu. In this case I am receiving this
message: "HTML content will be modified. WARNING: Your HTML contains
some taks that are not permitted. These have been removed from your
changes. OK CANCEL" If I select OK then editor removes most of the
code and leaves only the alternative site code. If I select CANCEL
then I return to the HTML editor.
The other way is by selecting 'Insert>HTML Box' from the edit menu. In
this case, the editor allows a save. Then when the page is displayed,
the alternative URL and message is displayed.

I have posted the SWFObject code below for your inspection:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="http://www.xyvy.info/web/
swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
var params = {};
params.play = "true";
params.loop = "true";
params.menu = "true";
params.quality = "high";
params.scale = "showall";
params.wmode = "window";
params.bgcolor = "#ffffff";
params.devicefont = "false";
params.allowfullscreen = "true";
params.allowscriptaccess = "sameDomain";
params.base = "http://www.xyvy.info/web/";
var attributes = {};
attributes.id = "StatPlanet";
attributes.name = "StatPlanet";
attributes.align = "middle";
swfobject.embedSWF("http://www.xyvy.info/web/StatPlanet.swf",
"myAlternativeContent", "780", "420", "9.0.4", false, flashvars,
params, attributes);
</script>
</head>
<body>
<div id="myAlternativeContent">
<a href="http://www.xyvy.info/web/
StatPlanet_small.html"><table><tr><td><b>Click here if the interactive
map does now open in this window.<br>A new window will open.</b><br></
td></tr></table></a>
</div>
</body>
</html>

I cannot figure out why this code works as a web page in Chrome but
not an embed in Sites.

Thanks for your guidance.

Aran Rhee

unread,
Apr 30, 2012, 1:28:12 PM4/30/12
to swfo...@googlegroups.com
Hmmm.

I am not familiar with the limitation of Google sites. If it is stripping out js code, then you need to find a way around that. I have seen that  some people have gotten around this by using an <iframe> widget on their Google sites page (where the remote page has the required swfobject code etc).

However, this is a question better asked on Google sites forums etc, as there is nothing that SWFObject library itself can do to deal with this code stripping...

Aran




--
You received this message because you are subscribed to the Google Groups "SWFObject" group.
To post to this group, send email to swfo...@googlegroups.com.
To unsubscribe from this group, send email to swfobject+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.


Sam Sherlock

unread,
May 2, 2012, 12:41:45 AM5/2/12
to swfo...@googlegroups.com

yep
and here is a write up with video
http://sites.google.com/site/amslerclassroom/embed-or-link-a-video

Aran mentioned no4 - but the other options look worth while

 - S
Reply all
Reply to author
Forward
0 new messages