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;
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.