Swfobject - 在 flash 之前加载替代内容

发布于 2024-12-08 02:35:55 字数 1316 浏览 0 评论 0原文

我的页面上有一个 Flash 地图。我的问题是,当页面加载一段时间后,我可以看到替代内容,然后是地图。

HTML:

   <div class="flash-wrapper">
     <div id="flash-map" class="flash">
       <div id="noflash">
         <p>
           <span>Aby poprawnie wyświetlić tę stronę prosimy o zainstalowanie<br />programu Adobe Flash Player.</span>
            <a class="FlashAltButton" href="http://www.adobe.com/go/getflashplayer" title="Pobierz Adobe Flash Player"><img src="/pl/img/get_flash_logo.png" alt="Pobierz Adobe Flash Player" width="158" height="39" /></a>
         </p>
       </div>
    </div>
  </div>

SWFOBJECT:

           swfobject.embedSWF("http://site/flash/contest/map.swf", 
                  "flash-map", 
                  "410", 
                  "365", 
                  "9.0.0", 
                  "http://site/flash/contest/expressInstall.swf",
                  flashvars, 
                  params
        );

    var params = {
    quality: 'high',
    bgcolor: '#ffffff',
    play: "true",
    loop: "true",
    wmode: "transparent",
    scale: "showall",
    menu: "true",
    devicefont: "false",
    salign: "",
    allowFullScreen: "true",
    allowScriptAccess: "sameDomain"
  };

I have a Flash map on my page. My problem is that when the page loads for a while I can see the alternative content and then the map.

HTML:

   <div class="flash-wrapper">
     <div id="flash-map" class="flash">
       <div id="noflash">
         <p>
           <span>Aby poprawnie wyświetlić tę stronę prosimy o zainstalowanie<br />programu Adobe Flash Player.</span>
            <a class="FlashAltButton" href="http://www.adobe.com/go/getflashplayer" title="Pobierz Adobe Flash Player"><img src="/pl/img/get_flash_logo.png" alt="Pobierz Adobe Flash Player" width="158" height="39" /></a>
         </p>
       </div>
    </div>
  </div>

SWFOBJECT:

           swfobject.embedSWF("http://site/flash/contest/map.swf", 
                  "flash-map", 
                  "410", 
                  "365", 
                  "9.0.0", 
                  "http://site/flash/contest/expressInstall.swf",
                  flashvars, 
                  params
        );

    var params = {
    quality: 'high',
    bgcolor: '#ffffff',
    play: "true",
    loop: "true",
    wmode: "transparent",
    scale: "showall",
    menu: "true",
    devicefont: "false",
    salign: "",
    allowFullScreen: "true",
    allowScriptAccess: "sameDomain"
  };

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情未る 2024-12-15 02:35:55

我相信您所看到的是令人讨厌的FOUC(无样式内容的 Flash)。如果您正在加载的 SWF 太重(或连接速度太慢),有时会在内容完全加载之前显示页面(这在当今的 CSS 样式表中也很常见)。

我现在能想到的唯一解决方案是将替代内容设置为“可见性:隐藏”,然后如果没有Flash,则通过Javascript使其可见。唯一的问题是,如果客户端没有 Flash 和 Javascript,他最终将没有内容......所以我很想听到不同的解决方案!

I believe that what you are seeing is an annoying FOUC (Flash of Unstyled Content). If the SWF you are loading is too heavy (or the connection too slow), sometimes happens as the pages displays before the content is totally loaded (it's quite common with CSS stylesheets too nowadays).

The only solution I can think of right now is set the alternative content to "visibility:hidden", and then if there is no Flash, make it visible by Javascript. The only problem is that if the client has no Flash and no Javascript he'll end up with no content... so I'd love to hear different solutions for this!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文