nautilia
nautilia

Reputation: 75

flash to html5 fallback for a file (no video)

I have several Flash animations (maps with buttons that show/hide layers, slideshows, etc.). I'm looking for a code that loads in the first time a Flash animation (file.swf) and, if it couldn't be showed/loaded (i.e. in iOS devices), fallback to a HTML5 file. (file.html; maybe inside an iframe)

I'm converting some SWF to HTML5 with Swiffy, but results are not always OK. So, I prefer trying to load the SWF file in the first time.

All codes I've found are for videos and audios. I don't know how to adapt them to work with SWF and HTML files, instead of SWF and MP4/OGG.

Any suggestion will be welcome. Thanks in advance.

Upvotes: 0

Views: 1072

Answers (1)

net.uk.sweet
net.uk.sweet

Reputation: 12431

Have a look at SWFObject which is the standard method of embedding Flash in a webpage. If you're using CS5 you can change your publish settings so that the HTML which is generated includes the SWFObject code automatically (see this tutorial).

This method will allow you to progressively enhance your page by replacing the contents of a specific div, which should contain your fall-back method, with your Flash content, but only if the user's browser supports Flash. This method will work for any browser / device which does not support Flash.

Upvotes: 1

Related Questions