When embedding Flash content on a page, you will encounter issues in at least these 3 areas:
- Is Flash supported in the client browser?
Flash needs to be installed and enabled in the client browser, and you need to handle situations when it is not.
- How does this browser handle Flash ?
Flash is a proprietary technology and different browsers have chosen to support it in differing ways, especially detecting Flash versions and rendering alternative content when the flash player is not present.
- Is the required Flash version support?
Your code was written for Flash 9, but the client browser only has Flash 8. The user should be asked to upgrade their Flash version.
When the Satay method failed me, I then looked to Adobe, the owner of the proprietary Flash technology. Adobe supports several methods for embedding Flash: Adobe Flash Detection Kit. I was hoping that since I was not able to use the more accessible Flash Satay method, that I could at least use officially supported technologies. Unfortunately, I was still receiving the same security warning on secure servers in IE 6 (although, the Adobe site claims that their script works around this).
Then, I asked myself it the IE 6 security warning was really a serious issue. And It is a huge issue, as the site is most likely secure, because it contains sensitive information. Users of a site, where their browser frequently warns them that they not secure, will be less likely to trust it that site. And even though the warning is bogus, your users won
The only technique successfully defeating the IE 6 security warning bug, is SWFObject, which is why I choose to use it above all others. It is also simple to use, and easy to setup alternative content. Here is a simple example:
Example 1: Using SWFObject
var so = new SWFObject(/assets/swf/mySWF.swf,embeddedSwfId,950,950,9.0.115,#FFFFFF); so.addParam(quality,high); so.addParam(wmode,transparent); so.addParam(salign,tl); so.write(flash-container); // DOM node to embed flash content into
This little code snippet will embed the mySWF.swf
inside the flash-container
element and assign the embedded SWF the id of embeddedSwfId
. The create DOM node will have width and height of 950 and a background of black. Lastly, we tell the SWFObject
that we require version 9.0.115&rsquot; of the Flash player.
In addition to all the issues above, you may encounter server-related issues when requesting the Flash content (usually a SWF file) as a result of compression and/or caching techniques. Fortunately, these issues are well documented and you will most likely find a reasonable solution with a quick google search.