Swfobject 2.2 available

Posted on June 11, 2009

Quick heads up: everybody’s favorite embed and detect script, swfobject has been updated to 2.2. Some of the news include:

  • Improved DomContentLoaded emulation for Internet Explorer
  • Dynamic library support
  • Callback method for embedding Flash content
  • No more need for <embed>
  • Improved Flash Player version detection for non-Internet Explorer browsers
  • Improved Adobe Express Install

…and more. Perhaps the one feature we will use most is the callback method. From the project’s own Wiki, here’s a quick sample:

?View Code JAVASCRIPT
1
2
3
4
5
function alertStatus(e) {
  alert("e.success = " + e.success +"\ne.id = "+ e.id +"\ne.ref = "+ e.ref);
}
 
swfobject.embedSWF("myFlashContent.swf", "myContent", "300", "120", "9", "expressInstall.swf", null, null, null, alertStatus);

Useful for redirecting if the embed failed or presenting the user with some alternative experience.

Tags: , ,

Comments are closed.