Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An extremely lightweight, jquery-based alternative to the massive swfobject library.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 js
Octocat-spinner-32 README
Octocat-spinner-32 index.html
README
Use jquery-flash like this;

<script type="text/javascript">
    $(document).ready(function(){
        $('#flash').flash();
    });
</script>

This particular example converts this;

<a id="flash" href="http://www.youtube.com/v/Br8zEBwv81Y">Javascript disabled! Click here for video.</a>

to a youtube video object. jquery-flash will automagically inherit classes, ids, dimensions and href from the original container unless you specify them in the constructor like this;

<script type="text/javascript">
    $(document).ready(function(){
        $('#flash').flash({
            'src':'http://www.nerdculture.org/wp-content/uploads/audioplayer/mediaplayer.swf',
            'width':'480',
            'height':'300',
            'allowfullscreen':'true',
            'allowscriptaccess':'always',
			'version': '9.0.24',
            'flashvars': {
                'file':'http://www.nerdculture.org/wp-content/uploads/music/playlist.xml',
                'displayheight':'0',
                'backcolor':'0xFFFFFF',
                'frontcolor':'0x666666',
                'lightcolor':'0xFF6600',
                'thumbsinplaylist':'true',
                'width':'480',
                'height':'300'
            }
        });
    });
</script>

Express Install is supported by adding an 'express' line to the constructor json object with the url of the express install swf. If the user's flash version is less than the number specified by 'version' express install will be place in place of the one provided in 'src'. If no flash is installed the original element will be left completely untouched, so it's easy to put in a "no flash" image and replace it with jquery-flash.

jquery-flash adds 3 extra functions now;
isie(); // returns boolean
hasflash(); // returns boolean
flashversion(); // returns array ["10","0","45"]

Everything else functions exactly the same way, it's just a little more flexible now. :)
Something went wrong with that request. Please try again.