1

我是 php 的新手,我有一个小问题。

我的索引 php 中有一个 flash,就像这样

<div class="flash">
        <script language="JavaScript" type="text/javascript">
        /* <![CDATA[ */
            if (AC_FL_RunContent == 0) {
                alert("This page requires AC_RunActiveContent.js.");
            } else {
               AC_FL_RunContent(
                    'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
                    'width', '903',
                    'height', '301',
                    'src', 'swf/whatever',
                    'quality', 'high',
                    'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
                    'align', 'middle',
                    'play', 'true',
                    'loop', 'true',
                    'scale', 'showall',
                    'wmode', 'transparent',
                    'devicefont', 'false',
                    'id', 'whatever',
                    'bgcolor', '#ffffff',
                    'name', 'whatever',
                    'menu', 'true',
                    'allowFullScreen', 'false',
                    'allowScriptAccess','sameDomain',
                    'movie', 'swf/whatever',
                    'salign', ''
                    ); //end AC code
            }
        /* ]]> */
        </script>
</div>

我想要一个无法显示 Flash 的图像,比如说 iOS 系统。前任。

谁能帮我?

4

1 回答 1

0

You can try with the following trick:

<script language="JavaScript" type="text/javascript">
        /* <![CDATA[ */
            if (AC_FL_RunContent == 0) {

                document.write("<img src='/path/to/image.png'>");

                } else {
    ...
                }
            /* ]]> */
        </script>

If you show an alert window with the text "This page requires AC_RunActiveContent.js." using the original page code the previous example should work.

If don't show the warning nor the flash content you should change the line

    if (AC_FL_RunContent == 0) { 

for

   if (typeof AC_FL_RunContent === 'undefined') {

The difference is that in the first piece of code the variable AC_FL_RunContent must be created to work properly. The second code checks if the variable actually exists.

You colud mix both methods.

Good luck.

于 2012-11-21T12:18:36.573 回答