Skip to content

jquery.flash v1.3 is ready!

by Qard on December 19th, 2009

There’s nothing major to change in such a minimal library, but such a difference the little things can make! New in version 1.3 is;

  • Class inheritance
  • Src inheritance from href for easy conversion of links
  • Built-in support for allowfullscreen parameter
  • Minor fix to dimensions inheritance
  • Added availattrs and availparams to settings object allowing anyone to add support for any extra attributes or parameters they might need!
  • Moved lots of code around to use as little characters as possible, allowing optimal minification. All this new functionality and it got even smaller! It’s now down to 1.91 KB.

Available options and their defaults:

$(this).flash({
    // As always; all settings are entirely optional.
    id			: $(this).attr('id'), // ID
    class		: $(this).attr('class'), // class
    width		: $(this).attr('width'), // Width
    height		: $(this).attr('height'), // Height
    src			: $(this).attr('href'), // Path to swf
    flashvars		: null, // JSON structured flashvars data
    bgcolor		: null, // Background color
    quality		: null, // Quality
    wmode		: null, // Window mode
    allowscriptaccess	: null, // Set to "always" to allow script access across domains
    allowfullscreen	: null, // Allow fullscreen viewing.
    classid		: 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000', // For IE support.
    codebase		: 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=', // Ditto.
    pluginspace		: 'http://get.adobe.com/flashplayer', // Download Firefox plugin if missing.

    // Custom attributes and parameters are added like this;
    // ['someattributename','someotherattributename']
    //
    // Then add it to the settings just like the ones above were added.
    availattrs		: [], // These are the attributes we should attempt to add.
    availparams		: [], // These are the parameters we should attempt to add.

    // Version is used for flash version detection in conjunction with the express install swf value below.
    version		: '9.0.24', // Minimum Flash version
    express		: null // Path to express install swf
});

jquery.flash.js – Uncompressed
jquery.flash.min.js – Minified

  • http://www.rosem.com Mike

    nice work! was just looking for a swfObject replacement (JSON errors) and thought, “just my luck” to see this was posted today. :)

    however, is there somewhere where I can see the code in it’s entirety up and working? I’m having a hard time implementing it.

    thanks!
    mike

  • http://www.rosem.com Mike Rose

    actually, I think your link to the minified version isn’t up? seems to be linking to the same place as uncompressed?

  • http://www.yellowbutton.com Joel Davis

    Thanks for your hard work.

    I think that the link to the minified version is incorrect. It appears the link is to the same place as the uncompressed version.

  • Qard

    Oops. Minified link is fixed now. About the implementation example; I’ll try and look at making a page for it tonight.

  • http://twitter.com/kyletyoung Kyle Robinson Young

    Awesome release! All the other flash embed scripts (including swfobject) break when trying to dynamically embed on a click event in IE. Yours works flawlessly, thanks again!