splitrockresort
Programmer
This is my problem...
I'm creating a site in php which pulls in the header seperately with an include ( <? include("header.php") ?> ).
The header uses flash but I've also created a dhtml version the emulates some of the flash features for those without flash....
What I'm looking for is a flash 6 detection script that will
1. test to see if the user has flash
2. if he has flash it will excute the flash movie
3. if he doesn't have flash, it will execute the dhtml code
I need all of this to work on one page (header.php)
I've seen scripts that will display a flash image if you have flash and a jpeg or gif if you don't...
but I haven't seen any that will execute html code (without transfering you to another page) instead of simply displaying a static image....
does any one have a script that operates like this?
i'm using this script:
<SCRIPT LANGUAGE=JavaScript1.1>
<!--
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words)))
continue;
var MM_PluginVersion = words;
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
window.location.replace("header.php");
} else{
window.location.replace("header2.php");
}
//-->
</SCRIPT>
and i'm trying to modify it like this:
window.location.replace("<? include("header.php") ?>");
} else{
window.location.replace("<? include("header2.php") ?>");
but it wind's up showing BOTH headers and some of the javascript script code.....
(see )
I know it's the quotaion marks or maybe the question marks php uses....
any idea on how to go around this...?
I'm creating a site in php which pulls in the header seperately with an include ( <? include("header.php") ?> ).
The header uses flash but I've also created a dhtml version the emulates some of the flash features for those without flash....
What I'm looking for is a flash 6 detection script that will
1. test to see if the user has flash
2. if he has flash it will excute the flash movie
3. if he doesn't have flash, it will execute the dhtml code
I need all of this to work on one page (header.php)
I've seen scripts that will display a flash image if you have flash and a jpeg or gif if you don't...
but I haven't seen any that will execute html code (without transfering you to another page) instead of simply displaying a static image....
does any one have a script that operates like this?
i'm using this script:
<SCRIPT LANGUAGE=JavaScript1.1>
<!--
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words)))
continue;
var MM_PluginVersion = words;
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
window.location.replace("header.php");
} else{
window.location.replace("header2.php");
}
//-->
</SCRIPT>
and i'm trying to modify it like this:
window.location.replace("<? include("header.php") ?>");
} else{
window.location.replace("<? include("header2.php") ?>");
but it wind's up showing BOTH headers and some of the javascript script code.....
(see )
I know it's the quotaion marks or maybe the question marks php uses....
any idea on how to go around this...?