Flash 嵌入:如果用户未安装 Flash,如何添加显示的消息而不是 Flash 视频?

发布于 2024-09-09 00:08:07 字数 2401 浏览 1 评论 0原文

我有一个名为 abc.swf 的 Flash 视频,我想在用户首次注册我们的网站时播放该视频。但是,如果用户没有闪光灯,我需要它以一种简单的方式告诉他们。

出于这个原因,我试图告诉他们如何使用以下 html 下载 flash:

<div style="text-align:center;"> 
    <p><strong>You do not have Flash installed, or it is older than the required 10.0.0.</strong></p>
    <p><strong>Click below to install the latest version and then try again.</strong></p>
    <p><a target="_blank" href="https://www.adobe.com/go/getflashplayer">
        <img src="images/get_flash_player.png" width="112" height="33" alt="Get Adobe Flash player" />
    </a></p>
</div>

困难的部分(对我来说,希望不是你 ^^)是让它仅在他们没有安装 flash 时显示。这是我到目前为止所拥有的:

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
                codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
                width="720" height="488" id="xxx" align="middle">
            <param name="allowScriptAccess" value="sameDomain" />
            <param name="allowFullScreen" value="false" />
            <param name="movie" value="abc.swf" />
            <param name="quality" value="high" />
            <param name="wmode" value="gpu" />
            <param name="bgcolor" value="#ffffff" />
            <embed src="abc.swf" quality="high" wmode="gpu" bgcolor="#ffffff" 
            width="720" height="488" name="abc" 
            align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" 
            pluginspage="http://www.adobe.com/go/getflashplayer" />
            <div style="text-align:center;"> 
                <p><strong>You do not have Flash installed, or it is older than the required 10.0.0.</strong></p>
                <p><strong>Click below to install the latest version and then try again.</strong></p>
                <p><a target="_blank" href="https://www.adobe.com/go/getflashplayer">
                    <img src="images/get_flash_player.png" width="112" height="33" alt="Get Adobe Flash player" />
                </a></p>
           </div>
</object>

但它显示下载闪存消息,无论它们是否安装了闪存,并且它显示在视频下方(或者如果安装了闪存,则视频将在哪里)。

有办法做到这一点吗?谢谢!

i have a flash video called abc.swf that i would like to play when a user first registers to our website. however, if the user does not have flash, i need it to tell them that in an easy way.

for this reason, i am trying to tell them how to download flash with the following html:

<div style="text-align:center;"> 
    <p><strong>You do not have Flash installed, or it is older than the required 10.0.0.</strong></p>
    <p><strong>Click below to install the latest version and then try again.</strong></p>
    <p><a target="_blank" href="https://www.adobe.com/go/getflashplayer">
        <img src="images/get_flash_player.png" width="112" height="33" alt="Get Adobe Flash player" />
    </a></p>
</div>

the hard part (for me, hopefully not for you ^^) is getting it to show ONLY when they do not have flash installed. here is what i have so far:

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
                codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
                width="720" height="488" id="xxx" align="middle">
            <param name="allowScriptAccess" value="sameDomain" />
            <param name="allowFullScreen" value="false" />
            <param name="movie" value="abc.swf" />
            <param name="quality" value="high" />
            <param name="wmode" value="gpu" />
            <param name="bgcolor" value="#ffffff" />
            <embed src="abc.swf" quality="high" wmode="gpu" bgcolor="#ffffff" 
            width="720" height="488" name="abc" 
            align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" 
            pluginspage="http://www.adobe.com/go/getflashplayer" />
            <div style="text-align:center;"> 
                <p><strong>You do not have Flash installed, or it is older than the required 10.0.0.</strong></p>
                <p><strong>Click below to install the latest version and then try again.</strong></p>
                <p><a target="_blank" href="https://www.adobe.com/go/getflashplayer">
                    <img src="images/get_flash_player.png" width="112" height="33" alt="Get Adobe Flash player" />
                </a></p>
           </div>
</object>

but it shows the download flash message regardless of whether they have flash installed or not, AND it shows up under the video (or where the video would be if flash was installed).

is there a way to do this? thanks!

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

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

发布评论

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

评论(2

梦巷 2024-09-16 00:08:07

您可以使用 SWFObject

<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("abc.swf", "flashcontent", "720", "488", "10.0.0")
</script>

<div id="flashcontent">
<p><strong>You do not have Flash installed, or it is older than the required 10.0.0. </strong></p>
<p><strong>Click below to install the latest version and then try again.</strong></p>
<p><a target="_blank" href="https://www.adobe.com/go/getflashplayer">
<img src="images/get_flash_player.png" width="112" height="33" alt="Get Adobe Flash player" />
</a></p>
</div>

只需下载 swfobject 并将其放在同一目录中即可。然后将此代码复制并粘贴到您的页面上,它应该可以执行您想要的操作。

You could use SWFObject:

<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("abc.swf", "flashcontent", "720", "488", "10.0.0")
</script>

<div id="flashcontent">
<p><strong>You do not have Flash installed, or it is older than the required 10.0.0. </strong></p>
<p><strong>Click below to install the latest version and then try again.</strong></p>
<p><a target="_blank" href="https://www.adobe.com/go/getflashplayer">
<img src="images/get_flash_player.png" width="112" height="33" alt="Get Adobe Flash player" />
</a></p>
</div>

Just download swfobject and place in the same directory. Then copy and paste this code onto your page and it should do what you want.

寂寞美少年 2024-09-16 00:08:07

您应该使用 javascript 动态创建对象,然后检查对象是否加载成功,如果没有,则将消息打印到屏幕上。

you should create the object dynamicly using javascript and then check if the object loaded successfully if it didn't then print your message to the screen.

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