Tuesday, September 20, 2005

Using FlashObject by Theodore Patrick

Detecting and displaying Flash content seamlessly is an art. In this example I am using FlashObject by Geoff Stearns to display Flash content when the user clicks a link. FlashObject handles Flash Player detection and writes valid XHTML to screen replacing DIV content seamlessly and effortlessly.&

Having worked with many Flash detections systems none comes close to what Geoff Stearns has done with FlashObject. He has made properly embedding Flash content on a web page seamless and XHTML compliant. At IFBIN we are replacing all Satay detection scripts with FlashObject because it just works so well.

Last week we discovered a problem with the IFBIN News blog. Since we post new examples every weekday, on the index and archive pages we are seeing 5-20 Flash assets rendering on a single page. In order to reduce the number of Flash Players displayed we researched a using FlashObject to replace HTML content with an Example SWF when the user clicked. Ideally we would show and Image, then replace it with the real content if the user wanted to view it. Here is what we came up with:



My favorite feature of FlashObject is that you never duplicate Flash settings. Enter them once and you are done! I have made so many mistakes making sure the object settings match the embed settings. The funny thing is that using FlashObject, embedding Flash compatibly is simpler than using object/embed.

I have to thank Geoff Stearns for creating such a great Flash detection system. Take some time to explore FlashObject, once you use it you will never use any other detection system.

We will be providing a series of HTML/JS examples using FlashObject within IFBIN. We also just completed integration of FlashObject on the new IFBIN homepage this morning.

This example is available with full source and documentation within Flash® by Example.

More to come.

Ted Patrick

1 Comments:

At September 20, 2005 9:56 AM, Geoff Stearns said...

Wow, what a nice thing to wake up to... Nice work with the content replacement stuff :)

 

Post a Comment

<< Home