开发者

Embedding swf in google site

I have a google site. I want to embed an SWF file but I am not able to do it. I am able to display开发者_如何学JAVA images and videos but not SWF files. Is there any solution to this problem?


You can use embed tab in in HTML edit mode

<embed src="//example.com/filename.swf"
  width="540" height="540" pluginspage="http://www.macromedia
  .com/go/getflashplayer"></embed>

After saving, it will automatically generated a gadget wrapping the swf file. You https protocol for robustness, otherwise insure content may not show up.


You could create your own gadget http://example.com/gadget.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Module> 
  <ModulePrefs title="Demo" 
               author="You!" 
               author_email="you@example.com" 
               width="558"
               height="558">
    <Require feature="flash"/>
  </ModulePrefs>
  <Content type="html">
    <![CDATA[
      <div id="flash-container"
           style="text-align:center;height:558;border:0;padding:0;margin:0">
        Loading...
      </div>
      <script type="text/javascript">
        function showFlash() {
          gadgets.flash.embedFlash(
            '//example.com/demo.swf', 'flash-container', 6
          );
        }

        gadgets.util.registerOnLoadHandler(showFlash);
      </script>
    ]]>
  </Content>
</Module>

The gadget you can then embed via the menu, by URL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜