SwfHTML

SwfHTML is the name of the object included with History Keeper which is used to embed swf files in HTML through JavaScript, but is also the umbrella name for all the swf/flash based tools included with History Keeper.

In the packed version (available in release archives, or in the tagged branches in SVN), the most useful items have been included:

Additionally, there are other tools included in source form:

  • SwfCommunicator.js – and it’s dependencies.
  • SwfHistory.js – bridge between flash and JavaScript based History Keeper – relies on SwfCommunicator and will likely undergo heavy changes soon.
  • ObjectPatentMagic.js – This IE activation patch is it’s own thing, and is included for convenience.

Finally, there is an experimental tool that go under the SwfHTML umbrella as well:

  • SwfShim.js and SwfShim.as (and it’s dependencies). This is working now, but is a mess inside. As soon as I figure out how to forward the flashvars, I’ll call this complete, and make a release. If I can’t figure that out, or if it isn’t possible, this will have to be rethought. The idea of this is to use a small swf to load the main swf. This would solve a couple of different issues with various embed methods, and Patent Magic, as well as provide a sneaky vector to easily implement ExpressInstall – a feature for which there seems to be precious little documentation.

The modular nature of most of these tools means you can pick and choose which functionality you require, and only include those pieces. For example, if you only need detect the player version, and output the swf embed code with javascript, you could get away with just including FlashPlayerInfo.js and SwfHTML.js. For a small bandwidth savings (not that the entire package is all that large 7.5kb packed, less than 4kb gzipped.).

Leave a Reply

Your email address will not be published. Required fields are marked *

Connect with Facebook

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Home of Scripts 'n Styles for WordPress, Backstage2D and History Keeper!