jQuery Flash Plugin - Flashvars Example

« Back to the jQuery flash plugin

Please sir, can I have some flashvars?

Javascript:

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

Before:

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

After:

<div id="example" class="flash-replaced">
    <embed width="360" height="215" type="application/x-shockwave-flash" src="example.swf" flashvars="foo=bar&baz=zoo" pluginspage="http://www.adobe.com/go/getflashplayer" />
    <div class="alt">Please sir, can I have some flashvars?</div>
</div>