I have this script. This determines if there is a flash player installed in the browser, it redirects the browser to a flash website. if not, then it opens a non-flash website.
The Code is here:
<SCRIPT LANGUAGE="JavaScript">
<!--
if ((navigator.appName == "Microsoft Internet Explorer" &&
navigator.appVersion.indexOf("Mac") == -1 && navigator.appVersion.indexOf("3.1") == -1) ||
(navigator.plugins && navigator.plugins["Shockwave Flash"])|| navigator.plugins["Shockwave Flash 2.0"]){
window.location='flash/index.html';
}
else {
window.location='index.html';
}
-->
</SCRIPT>
What i want is to embed this code in the non-flash index page. it should just check if there is no flash then simply go with the current index file that already has been opened, or if there is no flash player, then load the index file from within the flash website.
Currently, when index.html (non-flash) is opened, it goes into loop and keeps on checking for the flash player. Can I modify the window.location='index.html';
statement no to load any file here, just go on with the file already opened.??
Just remove the else statement.
To embed Flash content, I generally suggest using SWFObject. Using the SWFObject Generator is pretty straightforward.
Using SWFObject, you can enter both alternative content and Flash content on the same page. But it requires a little bit of refactoring in your case.