PDA

View Full Version : Non-Flash User Redirect



BobbyDouglas
June 26th, 2003, 05:57 PM
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:

ahmed
June 26th, 2003, 05:59 PM
www.moock.org/webdesign/flash/

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

does that help?

BobbyDouglas
June 26th, 2003, 06:02 PM
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.

mjULTRA
June 26th, 2003, 06:53 PM
Bobby Douglas!! That site looks freakin awesome!! Where did you learn to do such awesome site design??

Jubba
June 26th, 2003, 07:00 PM
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.

BobbyDouglas
June 26th, 2003, 07:26 PM
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:

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"

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?

BobbyDouglas
June 26th, 2003, 07:29 PM
attached is the imagemap info

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

BobbyDouglas
June 27th, 2003, 12:02 AM
Anyone? Heh..

ahmed
June 27th, 2003, 12:07 AM
who's bobby douglas?

BobbyDouglas
June 27th, 2003, 12:09 AM
Bobby Douglas is Bobby Douglas :P

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?

ahmed
June 27th, 2003, 12:13 AM
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? :)

BobbyDouglas
June 27th, 2003, 03:00 AM
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..

my3brs
June 27th, 2003, 03:57 PM
<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[i])))
continue;
var MM_PluginVersion = words[i];
}
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\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
stop;
} else{
window.location.replace("http://www.kirupa.com/noflash.htm");
}
//-->

</SCRIPT>

BobbyDouglas
June 27th, 2003, 04:00 PM
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[i])))
continue;
var MM_PluginVersion = words[i];
}
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\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
stop;
} else{
window.location.replace("http://www.kirupa.com/noflash.htm");
}
//-->

</SCRIPT>

Im going to go try it, thank you.

BobbyDouglas
June 27th, 2003, 04:09 PM
For those who want the script, download this attachment:

my3brs
June 27th, 2003, 04:22 PM
Did it really work? I just made up that script.

BobbyDouglas
June 27th, 2003, 04:26 PM
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...

BobbyDouglas
June 27th, 2003, 04:38 PM
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..

BobbyDouglas
June 27th, 2003, 04:53 PM
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?