How to automatically activate your Macromedia Flash movie after Microsoft's new Internet Explorer update.
OR
How do I get rid of "Click to activate and use this control"?
Basically, Microsoft lost a lawsuit and now they have to disable Internet Explorer from automatically starting objects on a webpage such as Flash. You can read more at: http://www.macromedia.com/devnet/activecontent/ and there's also a good article on SlashDot that you can search for.
Microsoft has published a solution for this, Adobe has published a more elegant solution, but the best and most straightforward workaround for this issue is to use Geoff's FlashObject. You can go off to his website for the full skinny on the subject but I've included the basics below.
How to enable your Flash automatically (without the stupid gray box):
- Download the javascript: [flashobject.js]
- Reference the javascript file in your web page. Usually, you'll want to put this within your header section.
<script type="text/javascript" src="flashobject.js"></script>
- Insert a div tag with the flash object id. Put your Flash content within the div tags. This will not show unless users have javascript disabled.
<div id="flashcontent"> This text is replaced by the Flash movie. </div>
- Add a script that calls the flash movie (with parameters). This will create a w3c compliant reference to your Flash movie, so make sure that you put this where you would normally put your flash content.
<script type="text/javascript">
var fo = new FlashObject("movie.swf", "mymovie", "200", "100", "7", "#336699");
fo.write("flashcontent");
</script>
- You can also pass in parameters and url variables.
Such as:
fo.addParam("wmode", "transparent");
fo.addVariable("variable1", "value1");
- It should look like this example: [example.html]