jsGears.com 技術論壇 - AJAX, JavaScript, jQuery, 網站開發, 前端效能優化's Archiver

wmh 發表於 2007-7-18 08:15

一百萬個感謝 in iGoogle

[url=http://h.vctu.com/AMillionThankYous.xml][img]http://lh6.google.com/hunter.wu/Rp1cno5y_zI/AAAAAAAAAf4/8JwNHSleqag/s400/AMillionThankYous.jpg[/img][/url]

意外發現 iGoogle API 中沒有提到的 flash 播放方式,首先要在 ModulePrefs 內放一段:[code xml]<Require feature="flash" />[/code]接著使用 _IG_EmbedFlash(),完整程式碼如下:[code xml]  <?xml version="1.0" encoding="UTF-8" ?>
- <Module>
- <ModulePrefs title="A Million Thank Yous">
  <Require feature="flash" />
  </ModulePrefs>
- <Content type="html">
- <![CDATA[
    <div id="flashPlayer"></div>
    <script>
      _IG_EmbedFlash('http://h.vctu.com/1000000.swf', _gel('flashPlayer'), {width: 300, height: 200});
    </script>
  ]]>
  </Content>
  </Module>[/code]

想要直接加入 iGoogle 的話,可以用此連結:
[url]http://h.vctu.com/AMillionThankYous.xml[/url]

頁: [1]

Powered by Discuz! Archiver  © 2001-2009 Comsenz Inc.