views:

32

answers:

3
+1  Q: 

Flash backup image

Hi guys, so I have a pretty big flash file on my homepage, which raises a few issues about what to do if the user doesn't have flash player installed on his/her PC.

I would like to make sure that if the user has a old version of flash player, or doesn't have it at all, a backup image will display in place of the flash, how can I accomplish that?

Iss Javascript or jquery an option?

A: 

Without JS and if no support:

<object.....><img src="noflash.gif" /></object>
mplungjan
Thanx for the help!
+1  A: 

Have a look at swfobject. It is the recommended method for embedding Flash into your webpage, and comes with all of the options you mentioned included.

Yi Jiang
Thanx, will do!
+2  A: 

The best choice, IMHO, is to use swfobject

It will handle both issues:

  1. Users with Javascript disabled will get whatever alternate content you have for them
  2. Users with an older version of Flash installed will be prompted to download a newer version (expressInstall.swf)

Example Code:

<div id='myFlashMovie'>This text or image will be replaced if the user has the correct version of Flash</div>
<script type="text/javascript">
    var flashvars = {};
    var params = {'allowfullscreen':'true', 'allowscriptaccess':'always', 'wmode':'opaque', 'bgcolor':'#000'};
    var attributes = {'name':'movie'};
    swfobject.embedSWF("path/to/flash/movie.swf", "myFlashMovie", "640", "410", "9.0.0","expressInstall.swf", flashvars, params, attributes);
</script>
sberry2A
Awesome, thanx will do!