What is a swfobject?
In order to help people understand flash deployment and the best practices thereof, I figured I would cover one of the technologies we use to allow flash to be displayed in your browser and the reasons why we use it. I am going to get fairly extensive in this description so even if you don’t know what I really mean when I say “the flash player” I will give you a general knowledge.
So when you are on the internet, you are using an application on your computer that is called a browser, unfortunately browsers do not have Flash Player already installed. Flash player is a program owned by Adobe that allows Flash content to be viewable in a browser. So, even though it may seem like a pain, you need one program to view “normal” web content and another program to view Flash content on the web. The reason for this is because the Flash player is proprietarily developed by Adobe and released on a separate timeline than most browser applications. In addition, Flash started out very small and browsers did not initially see it as an accepted and popular type of web content.
However, much has changed since then. Today, Flash is huge, with a penetration greater than any other multimedia type on the web. Below is some data that really drives this point home—illustrating that when Flash Player 9 came out in June 2006 it was present on 98% of computers. Also, it is worthwhile to note that as Flash player becomes more and more open source there may be a day where the Flash player is installed and updated simultaneously with the browser.

Source: Adobe.com
While I could spend a great deal of time touting the redeeming qualities of Flash, it’s almost a moot point given the numbers above. However, even if Flash had not gained popularity so quickly, something else would have come along to take its place. You see, I believe people are generally attracted to things on the web that mimic the way things behave in real life. And in my opinion, content that comes through programs like the Flash player are the best way to achieve this phenomenon.
Because the Flash player and the browser are two completely different programs, when a user happens to land on a page that has Flash content they should be prompted in a nice, friendly way that they do not have the right program installed to view the content. Chances are, as long as a web page is not using the newest version of Flash, this will rarely happen. But, with that said, the prompt should be as inviting and intuitive as possible. Enter swfobject.
Swfobject is a javascript tool that was authored by the awesome Geoff Stearns. Here’s how it works. If you visit a site with Flash but don’t have it installed, swfobject allows you to design something to replace where that original flash application/animation would have been if you had Flash in the first place. This is awesome because if the flash was there just for eye candy, as web designers we can opt to just show a static image and the user is not burdened with an install in the middle of their experience on the website. Or, if the content is important to the experience, we can direct that user to install Flash Player via adobe.com while maintaining the look and feel of the web site. This is crucial because you do not want your user to feel as if the site is broken or too complicated to view. Without something like swfobject to detect that the user did not have flash, the browser would probably prompt the user that they do not have the right program. However, this method is typically abrupt and varies across browsers preventing you from maintaining a unified look and feel.

Source:inplacesystem.com
If a user already has a Flash player (above Flash player ver. 6.0.65) we can also choose to do an express install. This option saves the user time because they don’t have to leave the website, but admittedly it is fairly disjointed from the look and feel of a site, as you can see in the image below:

With a great JavaScript Flash detection tool like swfobject we gain significantly more control over the Flash player installation process. And, the more control we have to alter that experience, the better experience we can ultimately create for the end user.






Post your comment