Odyss3us
Odyss3us

Reputation: 6635

Flash backup image

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?

Upvotes: 2

Views: 2214

Answers (3)

mplungjan
mplungjan

Reputation: 178011

Without JS and if no support:

<object.....><img src="noflash.gif" /></object>

Upvotes: 0

sberry
sberry

Reputation: 132018

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>

Upvotes: 2

Yi Jiang
Yi Jiang

Reputation: 50115

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.

Upvotes: 1

Related Questions