jQuery Flash Plugin

This jQuery plugin is for embedding Flash movies. Pages are progressively enhanced when Flash and JavaScript are available, and fallback to plain (X)HTML when they’re not. Replacements can happen as soon as the DOM is ready. (X)HTML, CSS and JavaScript stay separate, making it easy to remove, update or swap out later. Inspired by tools like SWFObject, UFO and sIFR, but written line-by-line for jQuery, no other scripts are required, meaning less redundancy, smaller filesize and faster loading.

Usage:

Basic Embed:
Javascript:

$(document).ready(function(){
    $('#example').flash(
        { src: 'example.swf',
          width: 720,
          height: 480 },
        { version: 8 }
    );
});

HTML:

<div id="example">Say hello to the jQuery flash plugin <img src="/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley"> </div>

Basic Flashvars Embed:
Javascript:

$(document).ready(function(){
    $('#example').flash(
        {
          src: 'example.swf',
          width: 720,
          height: 480,
          flashvars: { foo: 'bar', baz: 'zoo' }
        },
        { version: 8 }
    );
});

HTML:

<div id="example">Please sir, can I have some flashvars?</div>

Creating a JavaScript Library

I recently wrote a JavaScript library for creating random colors and color schemes, and while I foun…

jQuery Flash Plugin

This jQuery plugin is for embedding Flash movies. Pages are progressively enhanced when Flash and Ja…

jQuery Optimization: Optimize Selector

We can also optimize our selector other than being a bit specific on our selector. The key to optimi…

jQuery drop down menu: droppy

Quick and dirty nested drop-down menu in the jQuery style. I needed a nav like this for a recent pro…

jQuery slideViewerPro: A “pro” jQuery image slider

slideViewerPro is a fully customizable jQuery image gallery engine which allows to create outstandin…

jQuery Optimization: Avoid Unnecessary Styling

This is another common mistake that many jQuery developer made. jQuery provides us with the ability …