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 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值