SWFObject
Developer(s) | Geoff Stearns with Bobby van der Sluis, Aran Rhee, Kyle Simpson and Philip Hutchison |
---|---|
Initial release | January 2006 |
Final release | 2.2
/ June 12, 2009 |
Repository | |
Written in | JavaScript |
Platform | Web browser |
Size | 10 KB (output JS file) |
Available in | English |
Type | JavaScript library |
License | MIT License |
Website | https://github.com/swfobject/swfobject |
SWFObject (originally FlashObject) is an unmaintained
The library is independent, although related external libraries often integrate with it, such as SWFAddress for
With the multitude of Flash embedding JavaScript libraries, SWFObject has emerged as the most popular being used by over 2,600,000 websites as of 2011,[5] including high-profile websites such as Ask.com, Windows.com, Time.com, Skype.com, Discovery.com and YouTube.[6]
Usage
SWFObject provides a reliable method of embedding Flash content into a webpage
A disadvantage with SWFObject is that visitors with JavaScript disabled in their web browsers will not be able to view the Flash content,[12] and will instead see alternate HTML content provided by the web page.[13] For websites that aim to reach the widest possible audience an alternate method is available, by using standards-compliant HTML markup to embed the Flash movie (typically using the <object>
tags for the best browser compatibility[14]), and using the registerObject() function within the library's API[15] to register the Flash content enabling usage of the other features that the library provides.
Features
SWFObject also includes a few utility functions within its API to retrieve Flash Player related information, such as checking whether a specific version of Flash Player is installed, are satisfied internally, giving developers fewer reasons to add additional JavaScript libraries to their website.
The library can also be used to integrate Flash Player Express Install into the webpage, allowing users to install the latest Flash Player without leaving the site, although this requires a browser restart.[19]
Plugins
SWFAddress
SWFAddress is a JavaScript and ActionScript library that allows Flash websites to support deep linking, and can automatically integrate with SWFObject.
SWFFit
SWFFit (formerly known as FitFlash) is a JavaScript library used to resize Flash movies according to the browser window size, keeping it accessible independent of the screen resolution.[20][21][22][23] SWFFit primarily configures the web browser to display scroll bars when content exceeds the browser window size. It can also be used to dynamically resize the Flash movie size. It is used together with SWFObject.
See also
References
- ^ Todd Perkins, Search Engine Optimization for Flash, O'Reilly Media, 2009, p. 87
- ^ Yakov Fain, Victor Rasputnis, Anatole Tartakovsky, Enterprise Development with Flex, O'Reilly Media, Inc., 2010, p. 183
- ^ Source Checkout, swfobject - Google Code, Page Header, overview of SWFObject
- ^ SWFObject 1.5 Homepage, deconcept
- ^ SWFObject Usage Statistics, BuiltWith
- ^ Who uses SWFObject?, SWFObject FAQ
- ^ Adobe Developer Network
- ^ Roger Braunstein, ActionScript 3.0 Bible, John Wiley and Sons, 2010, p. 898
- ^ Embedding Adobe Flash Player content using SWFObject 2 - Documentation - Google Code
- ^ Ben Henick, HTML & CSS: The Good Parts, O'Reilly Media, Inc., 2009, p. 195
- ^ Do SWFs embedded with SWFObject 2 display in the Sony PS3 or Nintendo Wii web browsers?, SWFObject FAQ
- ^ Chafic Kazoun, Joey Lott, Programming Flex 3, O'Reilly Media, Inc., 2008, p. 524
- ^ Eric Enge, Stephan Spencer, Rand Fishkin, Jessie C. Stricchiola, The Art of SEO, O'Reilly Media, Inc., 2009, p. 273
- ^ Bobby van der Sluis > Flash embed test suite, HTML embed element compatibility
- ^ Function swfobject.registerObject, SWFObject JavaScript API documentation - Google Code
- ^ Robert Reinhardt, Snow Dowd, Flash CS4 Professional Bible, John Wiley and Sons, 2009
- ^ Function swfobject.hasFlashPlayerVersion, SWFObject JavaScript API documentation - Google Code
- ^ Function swfobject.add(Dom)LoadEvent, SWFObject JavaScript API documentation - Google Code
- ^ SWFObject 2.2 - What's new?, Google Code
- ^ swffit: Smart Flash Resize Script, Web Resource Depot
- ^ Roger Braunstein, ActionScript 3.0 Bible, John Wiley and Sons, p. 898
- ^ SWFFit website
- ^ SWFFit, Google Code
External links
- SWFObject 1.5
- SWFObject 1.5 Homepage, deconcept, overview and usage of an older version of SWFObject
- SWFObject 1.5 released, deconcept Blog
- SWFObject 2
- swfobject 2, Google Code, freely download SWFObject for usage on a website
- SWFObject 2 FAQ
- SWFObject Documentation, Google Code, the What, Why and How, of SWFObject 2
- General
- Methods of embedding Flash onto a webpage, internally used by SWFObject to maximize compatibility.
- Embed Multiple Web FLV Players in One Web page, using SWFObject or Flashvars code
- Flash Embedding Cage Match, A List Apart, compares the Flash embedding methods.
- swfobject.js vs Embed HTML, advantages of SWFObject over traditional HTML tags