A jQuery plugin for embedding Flash movies.
Related Topics:
Download
-
Features
-
Simple, but powerful.
Specify what you need, and nothing more -- sensible defaults take care of the rest.
$('#hello').
Perform sophisticated replacements by passing a custom callback.flash ({ src: 'hello.swf', width: 320, height: 240 });
$('.custom').
Overwrite the defaults to always to meet your needs.flash (null, null, function(htmlOptions){ // do stuff });
$.fn.
flash .replace = function(htmlOptions) { // always do stuff }; -
Flash Detection, Express Install and more.Flash plugin.
$('#hello').
Use Express Install, or show an update message ifflash ( { src: 'hello.swf' }, { version: '6.0.65' } );Flash isn't installed.
$('#hello').
Or, degrade silently and gracefully.flash ( { src: 'hello.swf' }, { expressInstall: true } );
$('#hello').
Bypassflash ( { src: 'hello.swf' }, { update: false } );Flash detection, just in case.
<a href="page.html?hasFlash=true">I have
Flash !</a> -
Accessible and Unobtrusive.
Pages are progressively enhanced whenFlash and Javascript are available, and fallback to plain (X)HTML when they're not — like search-engines, pdas or mobile phones. Replacements can happen as soon as the dom is ready. (X)HTML, CSS and Javascript stay where they belong — away from one another — making it easy to remove, update or swap out down the road.
$(document).ready(function(){ $('#hello').
flash ({ src: 'hello.swf' }); }); -
Native and light-weight.
Inspired by tools like SWFObject, UFO and sIFR, but written line-by-line for jQuery — no other scripts required. Less redundancy (jQuery and sIFR both find elements by css selectors and do browser detection, sIFR and SWFObject both doFlash detection) means smaller filesize and faster loading.
-
-
Examples
-
FAQ
- Which browsers are supported?
- Internet Explorer 5.5/6.0/7.0
- FireFox 1.5/2.0
- Safari 2.0
- Opera 9.0
- Why isn't ActiveX control activation in Internet Explorer working?
- The packed version of jQuery breaks ActiveX control activation, see: known issues.
-
Known Issues
- Problem:
- Using the packed version of jQuery breaks ActiveX control activation in Internet Explorer.
To avoid manual activation,
Flash movies (and other ActiveX controls) must be inserted by an external script. The packed version of jQuery is a string, which the browser unpacks using eval().Internet Explorer doesn't think the jQuery object (unpacked in theSee: jQuery/Packer/ActiveX Bug for more info.eval
) is “external”, which breaks the workaround. If anyone knows of a /packer/-compatible solution, I'm all ears! - Workaround:
Use JSMin to minify jQuery.Apply a simple patch to the uncompressed version of jQuery and then pack it.Use the minified version of jQuery instead of the packed version.
- Problem:
- When using the imagebox
plugin on the same page as a swf embeded with jQuery.
flash , the swf disappears when the imagebox opens, and doesn't reappear when the imagebox is closed. I haven't had time to test it myself. - Workaround:
- None
- Problem:
- Embed tag attributes are converted to lower case, which seems to be a problem with jQuery's DOM insertion methods (i.e.
.html()
,.prepend()
, etc.) - Workaround:
- Write a custom replace method that uses innerHTML instead of
.prepend()
-
Version History
-
1.0.2
February 8th, 2007
Updated documentation for the packed jQuery/Active X activation issue. -
1.0.1
November 17th, 2006
Added documentation for the packed jQuery/Active X activation issue. -
1.0
November 6th, 2006
Initial Release
-
0 comments:
Post a Comment