Redirect or detection

is it possible if i have two versions of a flash file made, to have a redirect or detection that would choose the swf depending on what version of flash player the user has?

so if they have flash five they get 5.swf and if they have flash 6 they get 6.swf:h:

i dont know if that is going to work, what i have is a page set up with the flash file at the top of the page. if i understand what you are saying, i should embed the java script in that html page and them make a swf that will hit that java script then the java script will load the correct swf.

i guess what i am getting at is, i want to use one html page to hold my flash file, and depending on what version of flash they have that file will be loaded.
i made almost the same flash movie in five and six, and i would like 6 to be loaded into the html page if they have six and five if they have five. but because of copy reasons i can only use one html page not two seperate.
thanks

r

this is the code that i am using in my html page. and in my flash file i have

getURL(“javascript:if()”);//in the first frame

<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&gt;
’); //FS hide this from IE4.5 Mac by splitting the tag
document.write(‘on error resume next
’);
document.write(‘MM_FlashCanPlay = ( IsObject(CreateObject(“ShockwaveFlash.ShockwaveFlash.” & MM_contentVersion)))
’);
document.write(’</SCR’ + ‘IPT&gt;
’);
}
if ( MM_FlashCanPlay ) {
window.location.load(“withflash.swf”);
} else{
window.location.load(“withoutflash.swf”);
}
//–>

</SCRIPT>

That seems way to crazy!

If I’m understanding you right…
You have one html page (containing a java detection script) and on that one html page you have one swf. You want to load 5.swf or 6.swf depending on the end-users flash player?

In your html page put this javascript in…


<!-- Flash detection 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\> 
'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next 
');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))
');
	document.write('</SCR' + 'IPT\> 
');
}
if ( MM_FlashCanPlay ) {
	window.location.replace("http://yourwebsite.com/flash.htm");
} else{
	window.location.replace("http://yourwebsite.com/noflash.htm");
}
//-->
</SCRIPT>
<!-- End Flash Detection Scriopt -->

of course changing the two websites above to reflect yours.

Then in your swf (the one on the html page) put this script and have it load either 5 or 6 into itself.
[AS]
requiredVersion = 6;
version = getVersion();
flash_ver = version.split(" ");
if (flash_ver[1].charAt(0)-0>=requiredVersion) {
loadMovie(“your6.swf”);
}
else{
loadMovie(“your5.swf”);
[/AS]