Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-02-2004, 09:10 PM   PM User | #1
Bullschmidt
Regular Coder

 
Join Date: Aug 2002
Location: USA
Posts: 478
Thanks: 0
Thanked 2 Times in 2 Posts
Bullschmidt is an unknown quantity at this point
Detect if user has Flash

Hi I'm an ASP developer.

I have a site for a client of mine where the initial page is Flash.

But the client said that some people don't have Flash installed so he would like a link to show up to obtain Flash:
http://www.macromedia.com/shockwave/.../download.cgi?

But here is the trick - he would only like the link to show up if the user does not already have Flash installed.

Is there a way to do this - perhaps with JavaScript somehow?

Thanks in advance!
__________________
J. Paul Schmidt
www.Bullschmidt.com - Freelance Web and Database Developer
www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips
Bullschmidt is offline   Reply With Quote
Old 09-02-2004, 09:51 PM   PM User | #2
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
First of all, I would challenge the base assumption - you can safely assume that the only people who don't have Flash don't have it by choice or necessity, not by accident or because they didn't know about it. So catering to people who don't have Flash means offering alternative content, not a link for them to download it.

No detection script is necessary. <object> semantics include a mechanism for providing content to browsers that don't support the object mime-type. The basic syntax goes like this:
Code:
<!-- flash content -->
<object type="application/x-shockwave-flash" 
	data="flash_file.swf" width="500" height="350">

	<param name="movie" value="flash_file.swf" />
	
	<!-- noflash content -->
	<p>
		... etc ...
	</p>

</object>
Plus whatever other <param/>s you're using.
__________________
"Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

Last edited by brothercake; 09-02-2004 at 09:54 PM..
brothercake is offline   Reply With Quote
Old 09-03-2004, 09:58 AM   PM User | #3
Bullschmidt
Regular Coder

 
Join Date: Aug 2002
Location: USA
Posts: 478
Thanks: 0
Thanked 2 Times in 2 Posts
Bullschmidt is an unknown quantity at this point
That looks great - and I love it when I can keep things simple - thanks a lot!!!
__________________
J. Paul Schmidt
www.Bullschmidt.com - Freelance Web and Database Developer
www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips
Bullschmidt is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:29 AM.


Advertisement
Log in to turn off these ads.