Web standards compliant Javascript Flash detect and embed

SWFObject is a small Javascript file used for embedding Adobe Flash content. The script can detect the Flash plug-in in all major web browsers and is designed to make embedding Flash movies as easy as possible. It is also very search engine friendly, degrades gracefully, can be used in valid HTML and XHTML 1.0 documents*, and is forward compatible.

There was an uproar during late 2002 when alistapart came up with an article Flash Satay. Nonthless, few limitations came as a package deal and one need to hack around the same. During the days of the Eolas Patent, the workaround where Javascript was used to embed Flash, was indeed serving up a dual role to attain Web Standard compliancy. But then that the Patent is no more a worry, the tiresome work-around is thus better left alone.

Geoff Stearns wrote an article, Web standards compliant Javascript Flash detect and embed which then gave birth to the ultimate in Standard Compliant Flash Object/Embed, the SWFObject.


UPDATES

I think I will just add some more text to make things easier and able to just read this to understand the core requirement, functionalities. The method have the ability to detect the Flash player major version and thus decide either to display the “swf” or an alternate content; even better as it can be bypassed just in case user has Flash but the detect failed for some reason(s). The method have have the ability to include additional parameters and variables passed to the “swf” via the Flashvars.

To pass Flashvars

var myFlashObject = new FlashObject("flashvars.swf", "flashvarsID", "500", "300", 7, "#ffffff");
myFlashObject.addParam("flashvars", "&flashVarTxt=From FlashVars");
myFlashObject.write();

Another cool features was the ability to target a specific element to place the “swf” in by passing an element id in the write() method;
myFlashObject.write("mydiv");

Well, this will be even better when we want to have content at the top hierarchy of the html while keeping the “swf” container script away from the same. For instance, you can have an “swf” masthead but use the script at a lower hierarchy so that search engines will find the actual content first and our tags/scripts later.

2006 November 20 — With Geoff’s changes to the SWFObject, the article above may not really apply aptly. Please refer to the SWFObject Documentation for more details.


Don't like it? There are lots of published articles, pick a random one.

oCricket

Brajeshwar posted this article on Sat, Jan 15th, 2005 at 7:06 am
Categorized under Technology

Suggest 1 or more tags for this article

Use a comma (,) to separate 2 or more tags.

[?]

Prev Article: Amu

Next Article: Virtual Stan


Possibly Related Articles

Archives: Visit the Archives for more articles.

Comments Post Yours

There are no response so far. You can follow any responses to this entry through the RSS feed. You can leave a response, or trackback from your own site.

Post yours

Sidenotes

Quick notes, scribbles, somehow related to this website and to what I do. Or perhaps I'm just plain lazy to make them into a full article.

Spawning does Django

Our team had a discussion yesterday why Spawning might be a good solution for our Python-Django specific Web server. The discussion is still hot on the table and have not come to a conclusion; nonetheless, ...2nd Aug, 2008

Take the A List Apart 2008 Survey

It's A List Apart's second annual survey for people who make websites. I took it! And so should you. The Survey for People Who Make Websites. This year's survey corrects many of last year's mistakes, with ...29th Jul, 2008

Django 1.0 alpha released

Django Project have released Django 1.0 Alpha today (22nd Jul, 2008 IST). If this is the timeline Django would stick to; then, Django 1.0 final release should hit the web on 2nd Sep, 2008. Alpha ...22nd Jul, 2008

The Continuum, a massive Flash Game

[flv:http://media.brajeshwar.com/v/games/the-continuum-trailer.flv 640 360] Watch The Continuum Trailer on YouTube Saw this at TechCrunch -- The Continuum: Flash Gaming Goes Hardcore. The Continuum is a new Flash game, featuring an extremely polished interface and deep ranking system. The ...12th Jul, 2008

Meez got a $20,000 cash prize for Flash Game Developers

Graphics from MeezMeezCreate your own 3D experience. Meez is organizing a Avatar Games contest for Flash Game Developer. There's $20,000 worth of cash in prize money. Meez has partnered with FlashGameLicense to run this contest starting ...9th Jul, 2008

View the Sidenotes Archive

Play the Penguin Game

Recommended

  • Forum Oinam’s technical discussion forum where developers and designers can discuss all technical topics.
  • Downloads All downloads, Free and Open Source.
  • o! Just Me Of colorful cultures, entertainment, media, life hacks, music, books and movies from hollywood & bollywood.
  • oCricket oCricket is about Cricket and people enthusiastic about it.
  • Oinam The official conglomerate of the Oinam related companies, institutes and holdings.
  • Ode to Apple Dedicated to Apple - Mac, iPhone, iPod, iTunes, Quicktime, Apple TV and all the awesome softwares for the Apple Mac.
  • My Special Job My Special Job is a place where you can look for your weird necessities, strangely superb employees, when your need are more of those hackers, geeks, and ultimate rockstars in the Internet Technology.
  • Financial services is piggyback paid commercial blogs. Brajeshwar neither endorses nor takes responsibility of the contents.

Download free Brajeshwar Wordpress Theme

Brajeshwar

Brajeshwar I firmly believe in keeping things simple, easy for users and I envison pushing the technical envelop time and again for the betterment of viable commercial and practical applications.

Want to know more about me?

Brajeshwar's affinity with Adobe

My Photos

More photos on Flickr

Member of 9rules Network

"Brajeshwar" has 836 Articles and 5,873 comments, contained within 20 categories and 1,145 tags.

This site is in operation since 11th June, 2001.