duanlu7223 2010-09-27 15:08
浏览 118
已采纳

HTML \ PHP:Flash Player检测技术

when we place flash files in our websites, it OFF-COURSE requires flash player on client machines, and prompts to install flash player...

is there some php code using which i can check weather there is flash player on the client machine and if not then instead of placing\embedding a flash file i place an images over there...

cuz in my specific case flash is not that much important... it is just for cosmetics, an animation... which i can replace by a gif or a simple jpeg doesnot matter...

but can i do it

  • 写回答

3条回答 默认 最新

  • duan02143 2010-09-27 15:18
    关注

    swfobject can help with this.

    You can just place the content to be shown if flash cannot be displayed in the code where the flash object should be, and point the script to it.

    In code :

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    
        <title>TestFlash</title>
    
        <!--import the swfobject library /-->
        <script type="text/javascript" src="swfobject.js"></script>
    
        <!--Define which div (by ID) gets replaced if flash is present /-->
        <script type="text/javascript">
            swfobject.embedSWF("myContent.swf", "flash1", "300", "120", "9.0.0");
        </script>
    
    </head>
    
    <body>
    
        <h1>We are testing some flash</h1>
        <hr />
    
        <div id="flash1">
            <!-- This stuff will show if flash is not present on the machine  /-->
            <img src="/img/image1.jpg" />
        </div>
    
        <hr />
        <h2>this is a footer</h2>
    
    
    </body>
    </html>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 任务A:大数据平台搭建(容器环境)怎么做呢?
  • ¥15 r语言神经网络自变量重要性分析
  • ¥15 基于双目测规则物体尺寸
  • ¥15 wegame打不开英雄联盟
  • ¥15 公司的电脑,win10系统自带远程协助,访问家里个人电脑,提示出现内部错误,各种常规的设置都已经尝试,感觉公司对此功能进行了限制(我们是集团公司)
  • ¥15 救!ENVI5.6深度学习初始化模型报错怎么办?
  • ¥30 eclipse开启服务后,网页无法打开
  • ¥30 雷达辐射源信号参考模型
  • ¥15 html+css+js如何实现这样子的效果?
  • ¥15 STM32单片机自主设计