# Flash detection script for cell phones

**URL:** https://forum.kirupa.com/t/flash-detection-script-for-cell-phones/288283
**Category:** Uncategorized
**Created:** [May 13, 2009, 5:47pm UTC](https://forum.kirupa.com/t/flash-detection-script-for-cell-phones/288283 "2009-05-13T17:47:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ciecierega](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@ciecierega](https://forum.kirupa.com/u/ciecierega)
#### Post date: [May 13, 2009, 5:47pm UTC](https://forum.kirupa.com/t/flash-detection-script-for-cell-phones/288283/1 "2009-05-13T17:47:24Z")

</div>

hi there,

i have a flash detection script that i’ve been using for awhile now (i might have even gotten it here) and it’s been working great. however, i’m trying to get an “index2” page to come up when the site is viewed on a non-flash supporting cell phone and it doesn’t seem to be doing the trick. i’m wondering if anyone has had any experience with this and what you might advise. thanks in advance for your help. below is the current script that i use:

\<SCRIPT LANGUAGE=JavaScript1.1\>  
\<!–  
var MM\_contentVersion = 8;  
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.write(“[http://www.denisebiondo.com/index.html](http://www.denisebiondo.com/index.html)”);  
} else{  
window.location.replace(“[http://www.denisebiondo.com/index2.html](http://www.denisebiondo.com/index2.html)”);  
}  
//–\>

\</SCRIPT\>
