Using SWFObject to Embed Flash
Posted: July 15th, 2008
Given last week’s excitement over Flash files getting partially indexed, I thought it would be a good time to reconsider applicable uses of Flash in web designs. Although Flash isn’t inherently compliant with search engine optimization, it could be used appropriately in certain instances. Here’s a quick spotlight on using SWFObject for SEO benefits, followed by some cogent arguments for employing Flash.
SWFObject is a small JavaScript file that you can use for embedding Macromedia Flash content into your website. The script detects Flash Player in all major web browsers (Mac OS and Windows) and is designed to make embedding SWF files as easy as possible.
To use SWFObject to embed Flash, you should design two versions of your site. The primary version will be an easily crawled HTML-based site, and the secondary version will be for Flash. The swfobject() JavaScript function will figure out whether a web browser supports Flash, and if so, it will change the page’s document object model (DOM) and dynamically display the Flash file instead of the primary content.
If SWFObject doesn’t detect a Flash-capable browser, or more importantly, any Flash-capable user-agent, then the primary SEO-friendly content will be shown. Spiders that have trouble crawling Flash will still have something to look at, as well as any visitor who doesn’t have Flash installed.
Some Cogent Arguments
A major objective in any company’s website is to portray the company’s brand and message properly while portraying its culture. A website is one way for a company to communicate with its audience, and sometimes this voice needs a little extra flavour to enhance the user-experience cake.
If your website is meant for the visually impaired, opt for a high-contrast textual website since Flash will do nothing in improving the user experience in this case. However, if your website’s theme is media-related, such as a movie production studio or animation portfolio, then employ Flash to reinforce the company’s brand and culture.
The key here is to weigh the importance of search engine optimization with the importance of delivering a meaningful user experience.
Tags: code, Flash, SEO, user experience, web development
Leave a Reply