# Non-Flash User Redirect

**URL:** <https://forum.kirupa.com/t/non-flash-user-redirect/24178>\
**Category:** programming\
**Created:** [June 26, 2003, 9:57pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178 "2003-06-26T21:57:39Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![BobbyDouglas](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@BobbyDouglas](https://forum.kirupa.com/u/BobbyDouglas)\
**Post date:** [June 26, 2003, 9:57pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/1 "2003-06-26T21:57:39Z")

</div>

Hey guys,

I have been searching ALL over the place to find a script that redirects the non flash users, however, the flash users stay on the same page.

I noticed a page about using a script to swap the flash movie for an image if the user does not have flash, however, I use an image map for the image, and I cant quite configure the two to work together.

[http://members.cox.net/fuji897/html/](http://members.cox.net/fuji897/html/) Is the non flash web site using the image map

[http://members.cox.net/fuji897/](http://members.cox.net/fuji897/) is the site using flash.

Any help? If I need to be more specific about something let me know.

Thanks in advance… :cowboy:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 26, 2003, 9:59pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/2 "2003-06-26T21:59:17Z")

</div>

[www.moock.org/webdesign/flash/](http://www.moock.org/webdesign/flash/)

that link has the best plug-in detection script on the internet 🙂

does that help?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 26, 2003, 10:02pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/3 "2003-06-26T22:02:39Z")

</div>

Nope, it redirects a flash user as well, which i dont want to happen.

The flash user stays, but the non flash user is redirected.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 26, 2003, 10:53pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/4 "2003-06-26T22:53:29Z")

</div>

Bobby Douglas!! That site looks freakin awesome!! Where did you learn to do such awesome site design??

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 26, 2003, 11:00pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/5 "2003-06-26T23:00:53Z")

</div>

I’m not really clear on what you mean. This script here:

[http://www.kirupa.com/developer/mx/detection.htm](http://www.kirupa.com/developer/mx/detection.htm)

can do one of two things, redirect people or place an image where the flash movie would go.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 26, 2003, 11:26pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/6 "2003-06-26T23:26:12Z")

</div>

> \*Originally posted by BobbyDouglas \*  
> \*\*Nope, it redirects a flash user as well, which i dont want to happen.

The flash user stays, but the non flash user is redirected. \*\*

Im 17, and have spent just about every minute on the computer since I was 14. Picks up after a bit.

"Jubba: I’m not really clear on what you mean. This script here:

> **[kirupa.com - Flash Detection Scripts](https://www.kirupa.com/developer/mx/detection.htm)**
>
> Use the Flash Detection scripts to ensure your visitors see your site the way it was meant to be seen!

can do one of two things, redirect people or place an image where the flash movie would go"

What I want, is a script to detect the user(having flash or not) and if he does NOT have flash, it re-directs him to another page. If he DOES have flash, then there is NO redirection.

The reason I want it to stay on the page if they have flash is because when a search engine picks up information about your site, they first, judge your index page, as well as meta tags, from that they rank your site on the amount of visitors. When someone goes to my site, and is redirected to the flash page, most decide to bookmark that page they are on, however, if they do that, then when they come back, they will come back to that page, instead ot eh redirect page. Thus, the index page does not get used as much, and then you get poor rankings on the search engines. Some judge on the amount of people that go to that specific page..

Also, it isn’t as professional to have the content that comes up in the search engine as [http://www.domain.com/flash/index.htm](http://www.domain.com/flash/index.htm) compared to [http://www.domain.com/](http://www.domain.com/)

The reason I cannot use the second script on that page is because I am using an ImageMap for the NonFlash Picture. I am not familiar enough with javascript to make an image map with it. You can view teh source of the page using the image map here: [http://members.cox.net/fuji897/html/](http://members.cox.net/fuji897/html/)

## here is the script for the image map:

## posting as attachment in new reply

Hopefully that explained it a little bit better. Any other questions?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 26, 2003, 11:29pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/7 "2003-06-26T23:29:54Z")

</div>

attached is the imagemap info

I remember in C++ there is a Donothing(); funtion… maybe you can use that someway in javascript? :sigh:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 4:02am UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/8 "2003-06-27T04:02:28Z")

</div>

Anyone? Heh…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 4:07am UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/9 "2003-06-27T04:07:22Z")

</div>

who’s bobby douglas?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 4:09am UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/10 "2003-06-27T04:09:02Z")

</div>

Bobby Douglas is Bobby Douglas 😛

I just kinda tripped onto these forums, and had a quesiton, scroll up to my question… So far nobody I know can do it…

Who are you?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 4:13am UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/11 "2003-06-27T04:13:37Z")

</div>

lol

im ahmed. im the forum’s wannabe actionscript guru.

i think i get what you are trying to do…

well you know the script that places an image if the user doesnt have the plug in? have that script on the same page where your flash movie is, and if the user doesnt have flash, instead of showing an image, redirect him/her to the page you want the engine to crawl (by editing the script). would that do it? 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 7:00am UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/12 "2003-06-27T07:00:00Z")

</div>

Good idea… however, I need to have the puicture it replaces with use an imagemap with about 6 links on it… just dunno how to configure it to work like that…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 7:57pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/13 "2003-06-27T19:57:51Z")

</div>

\<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 ) {  
stop;  
} else{  
window.location.replace(“[http://www.kirupa.com/noflash.htm](http://www.kirupa.com/noflash.htm)”);  
}  
//–\>

\</SCRIPT\>

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 8:00pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/14 "2003-06-27T20:00:36Z")

</div>

> \*Originally posted by my3brs \*  
> _\<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 ) {  
> stop;  
> } else{  
> window.location.replace(“[kirupa.com - Shocked Resource for Making Designers better Developers!](http://www.kirupa.com/noflash.htm)”);  
> }  
> //–\>

\</SCRIPT\> \*\*

Im going to go try it, thank you.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 8:09pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/15 "2003-06-27T20:09:08Z")

</div>

For those who want the script, download this attachment:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 8:22pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/16 "2003-06-27T20:22:29Z")

</div>

Did it really work? I just made up that script.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 8:26pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/17 "2003-06-27T20:26:19Z")

</div>

Hmm. This is kind of weird.

When you goto [http://members.cox.net/fuji897/](http://members.cox.net/fuji897/)

For the first time, it says there is an error, however, when you refresh it, there is no error…

Says ‘stop’ is undefined…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 8:38pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/18 "2003-06-27T20:38:52Z")

</div>

What if I use

if !( MM\_FlashCanPlay ) {  
window.location.replace(“html/index.htm”);  
}

?

Is ! the way of saying not true? Im still trying to learn javascript…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 27, 2003, 8:53pm UTC](https://forum.kirupa.com/t/non-flash-user-redirect/24178/19 "2003-06-27T20:53:07Z")

</div>

Here is another idea.

I just make another var and set it equal to 1.  
Then if MM\_FlashCanPlay is true, it sets the var to 2, thus doing nothing, and if it is not true, it redirects…

Any comments/suggestions?
