HOME

TheInfoList



OR:

SWFObject (originally FlashObject) is an
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
library A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vi ...
used to embed
Adobe Flash Adobe Flash (formerly Macromedia Flash and FutureSplash) is a multimedia software platform used for production of animations, rich web applications, desktop applications, mobile apps, mobile games, and embedded web browser video players. Fla ...
content onto Web pages and to protect the
flash game A browser game or a "flash game" is a video game that is played via the internet using a web browser. They are mostly free-to-play and can be single-player or multiplayer. Some browser games are also available as mobile apps, PC games, or on co ...
against piracy, which is supplied as one small JavaScript file. The library can also detect the installed
Adobe Flash Player Adobe Flash Player (known in Internet Explorer, Firefox, and Google Chrome as Shockwave Flash) is computer software for viewing multimedia contents, executing rich Internet applications, and streaming audio and video content created on the A ...
plug-in Plug-in, plug in or plugin may refer to: * Plug-in (computing) is a software component that adds a specific feature to an existing computer program. ** Audio plug-in, adds audio signal processing features ** Photoshop plugin, a piece of softwar ...
in all major
web browsers A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
, on all major operating systems (OS), and can redirect the visitor to another webpage or show alternate
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
content if the installed plug-in is not suitable. The library is independent, although related external libraries often integrate with it, such as SWFAddress for
deep linking In the context of the World Wide Web, deep linking is the use of a hyperlink that links to a specific, generally searchable or indexed, piece of web content on a website (e.g. "http://example.com/path/page"), rather than the website's home page (e ...
and SWFFit for dynamic content scaling. 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, including high-profile websites such as
Ask.com Ask.com (originally known as Ask Jeeves) is a question answering–focused e-business founded in 1996 by Garrett Gruener and David Warthen in Berkeley, California. The original software was implemented by Gary Chevsky, from his own design. War ...
, Windows.com,
Time.com ''Time'' (stylized in all caps) is an American news magazine based in New York City. For nearly a century, it was published weekly, but starting in March 2020 it transitioned to every other week. It was first published in New York City on Mar ...
, Skype.com, Discovery.com and
YouTube YouTube is a global online video sharing and social media platform headquartered in San Bruno, California. It was launched on February 14, 2005, by Steve Chen, Chad Hurley, and Jawed Karim. It is owned by Google, and is the second most ...
.


Usage

SWFObject provides a reliable method of embedding Flash content into a webpage by internally handling the various practices that one must follow in order for different web browsers to display Flash content correctly, and isolating them from the
web designer Web design encompasses many different skills and disciplines in the production and maintenance of websites. The different areas of web design include web graphic design; user interface design (UI design); authoring, including standardised code an ...
. The developer may interface with the library in a standardized manner, the minimum being a single line of JavaScript code. Therefore, even inexperienced web designers without knowledge of the ideal HTML code to embed Flash content, can easily insert Flash content into web pages, and have them reliably work for the widest possible audience (excepting those with JavaScript disabled). Flash content inserted using SWFObject will also work on devices that support JavaScript execution (and
Flash Player Adobe Flash Player (known in Internet Explorer, Firefox, and Google Chrome as Shockwave Flash) is computer software for viewing multimedia contents, executing rich Internet applications, and streaming audio and video content created on ...
), such as the
Wii The Wii ( ) is a home video game console developed and marketed by Nintendo. It was released on November 19, 2006, in North America and in December 2006 for most other regions of the world. It is Nintendo's fifth major home game console, ...
,
PlayStation 3 The PlayStation 3 (PS3) is a home video game console developed by Sony Interactive Entertainment, Sony Computer Entertainment. The successor to the PlayStation 2, it is part of the PlayStation brand of consoles. It was first released on Novemb ...
and
Nokia N800 The Nokia N800 Internet tablet is a wireless Internet appliance from Nokia, originally announced at the Las Vegas CES 2007 Summit in January 2007. N800 allows the user to browse the Internet and communicate using Wi-Fi networks or with mobi ...
, unlike the
PlayStation Portable The PlayStation Portable (PSP) is a handheld game console developed and marketed by Sony Computer Entertainment. It was first released in Japan on December 12, 2004, in North America on March 24, 2005, and in PAL regions on September 1, 200 ...
. A disadvantage with SWFObject is that visitors with JavaScript disabled in their web browsers will not be able to view the Flash content, and will instead see alternate HTML content provided by the web page. 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 tags for the best browser compatibility), and using the registerObject() function within the library's API 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, and a few
DHTML Dynamic HTML, or DHTML, is a term which was used by some browser vendors to describe the combination of HTML, style sheets and client-side scripts (JavaScript, VBScript, or any other supported scripts) that enabled the creation of interactive ...
utilities to help work with the DOM. Because of this, the most common reasons Flash Website developers turn to external JavaScript frameworks such as
jQuery jQuery is a JavaScript library designed to simplify HTML DOM tree traversal and manipulation, as well as event handling, CSS animation, and Ajax. It is free, open-source software using the permissive MIT License. As of Aug 2022, jQuery is ...
or Prototype 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.


Plugins


SWFAddress

SWFAddress is a JavaScript and ActionScript library that allows Flash websites to support
deep linking In the context of the World Wide Web, deep linking is the use of a hyperlink that links to a specific, generally searchable or indexed, piece of web content on a website (e.g. "http://example.com/path/page"), rather than the website's home page (e ...
, and can automatically integrate with SWFObject.


SWFFit

SWFFit (formerly known as ''FitFlash'') is a
JavaScript library A JavaScript library is a library of pre-written JavaScript code that allows for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies. Libraries With the expanded demands for JavaScript, an e ...
used to resize Flash movies according to the browser window size, keeping it accessible independent of the screen resolution.SWFFit
Google Code 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

*
Adobe Flash Adobe Flash (formerly Macromedia Flash and FutureSplash) is a multimedia software platform used for production of animations, rich web applications, desktop applications, mobile apps, mobile games, and embedded web browser video players. Fla ...
*
Adobe Flash Player Adobe Flash Player (known in Internet Explorer, Firefox, and Google Chrome as Shockwave Flash) is computer software for viewing multimedia contents, executing rich Internet applications, and streaming audio and video content created on the A ...
*
SWF SWF ( ) is an Adobe Flash file format used for multimedia, vector graphics and ActionScript.Open Screen Pr ...
*
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...


References


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 {{Adobe Flash Adobe Flash Software using the MIT license