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>