If you haven’t heard that was officially released, then get out of the hole you’ve been living in and !
When you’re ready to deploy your first Flash Player 10 SWF, you’ll want to ensure your users have the latest Flash Player so they can actually view your content! Why not make it as easy as possible for them to upgrade and use to embed your SWF and seamlessly upgrade older version of the Flash Player up to 10?
Let’s say you’re embedding a SWF called MyFlashPlayer10.swf. Using the there are just 3 simple steps to follow to get your SWF embedded with SWFObject…
1. Include the SWFObject JavaScript Library on Your Page
Assuming you’ve onto your server and placed swfobject.js in the same directory as the HTML page you’re editing:
<head> <script type="text/javascript" src="swfobject.js"></script> </head>
2. Add a DIV to Hold the SWF
Place a The content inside of the DIV will be replaced with your SWF if Flash is present on the user’s machine. Add the JavaScript code to embed the SWF after the tag you’ve added in step 1: Refer to the for the details of these parameters, but a quick explanation: The The parameters for embedSWF are: There are some other optional parameters, but I won’t go into those here. The important parameters to focus on for seamlessly upgrading are the 5th and 6th parameters. 10.0.12 means that we want at least Flash Player 10.0.12 to be installed. You can also just specify 10.0.0 for a minimum of Flash Player 10. The expressInstall SWF is included in the SWFObject download, and will provide the functionality of prompting the user to seamlessly upgrade their Flash Player. If the user confirms the prompt it presents the Flash Player installer will launch, and the user will be prompted to close the browser so the installation may proceed. Once it completes, Flash Player 10 (or whatever version has been required) will be installed on the machine! If you have more questions on SWFObject check out the .
<body>
...
<div id="swf">
You need <a href="http://www.adobe.com/go/getflash">Flash Player</a> to see this content!
</div>
3. Tell SWFObject to Embed the SWF
<script type="text/javascript">
<!--
swfobject.addDomLoadEvent(function() {
swfobject.embedSWF("MyFlashPlayer10.swf", "swf",
"300", "300",
"10.0.12", "expressInstall.swf");
});
//-->
</script>
addDomLoadEvent function ensures that the DOM is available before running a function.