I am newby in php and i have a small problem.
I have a flash in my index php, like this
<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>
i want an image there where flash cannot be displayed, let's say iOS systems. ex.
Can anyone help me?
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.