FLASH Question..

jklondon

Free Member
Nov 30, 2005
127
0
London (NW)
When loading a site that contains FLASH animation is it possible to detect (through coding) if the user has FLASH installed and only display the FLASH object if this is the case, if not then display a static image? Is the answer different for FireFox (or any other Mozilla browser) versus I.E?

Txs in advance!
 

mattk

Free Member
Dec 5, 2005
2,579
974
50
Swindon
You can use javaScript to do browser detection, but if a user doesn't have Flash enabled then it's likely they won't have JavaScript enabled too.

I use this code, which works OK for me in both IE and Firefox, doesn't need JavaScript and complies to XHTML Strict.

Code:
<object type="application/x-shockwave-flash" data="flash.swf" width="829" height="100">
	
		<param name="quality" value="high" />
		[img]flash.gif[/img]
</object>
 
Upvote 0
Best practice is to use swfobject, and to populate it's attendant alternative content div with a non-flash alternative (e.g a static image, or some text)

You can use it in dynamic or static mode (dynamic mode avoids 'click to activate in IE/Opera, while static mode doesn't avoid 'click to activate' but is fully standards compliant)

There is an automated code generator for it on swfobject's google code page that make's it easier to use, and the swfobject javascript file can be loaded from an external google hosted library url.
 
Last edited:
Upvote 0

Latest Articles

Join UK Business Forums for free business advice