Non-Flash User Redirect

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/ Is the non flash web site using the image map

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:

www.moock.org/webdesign/flash/

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

does that help?

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.

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

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

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.

*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:

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 compared to 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/

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?

attached is the imagemap info

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

Anyone? Heh…

who’s bobby douglas?

Bobby Douglas is Bobby Douglas :stuck_out_tongue:

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?

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? :slight_smile:

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…

<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”);
}
//–>

</SCRIPT>

*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!”);
}
//–>

</SCRIPT> **

Im going to go try it, thank you.

For those who want the script, download this attachment:

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

Hmm. This is kind of weird.

When you goto 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…

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…

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?