Removing Internet Explorer’s Active Content Warning on Flash Objects

By  on  

A couple of years ago Internet Explorer cause millions of programmers and users alike a giant pain by making users click on a flash object, ActiveX object, and java applet before the object became active and usable. Businesses, of course, cried out for their programmers to fix the problem and programmers pulled their hair out for weeks. As one of those programmers, I can tell you that businesses wont take "Microsoft screwed things up" for an answer and luckily I found a solution that works without requiring that the user do anything.

The solutions requires the use a small JavaScript file strategically placed immediately after the Flash object's </object> tag.

The File

flash-fix.js

The Code

Simply code your <object> code as usual:


width="200" height="100">





name="my_animcation" width="200" height="100" src="graphics/myanimation.swf" bgcolor="#FFFFFF" quality="high" swliveconnect="true" allowscriptaccess="samedomain">

That's all you have to do. The JavaScript code grabs the object and sets the object's outerHTML equal to itself, thus nullifying IE's effort to annoy the user.

Recent Features

Incredible Demos

  • By
    TextboxList for MooTools and jQuery by Guillermo Rauch

    I'll be honest with you: I still haven't figured out if I like my MooTools teammate Guillermo Rauch. He's got a lot stacked up against him. He's from Argentina so I get IM'ed about 10 times a day about how great Lionel...

  • By
    Highlighter: A MooTools Search &#038; Highlight Plugin

    Searching within the page is a major browser functionality, but what if we could code a search box in JavaScript that would do the same thing? I set out to do that using MooTools and ended up with a pretty decent solution. The MooTools JavaScript Class The...

Discussion

  1. Ben Hernandez

    These directions are not clear for a non-programmer. Can you help me? I’m using Dreamweaver 8.

  2. Wow that code fixed my problem. Thank you so much!

  3. hi, i was trying to solve this problem, and i couldn’t download the flash-fix script… would you please upload it again? thx

  4. Kenneth Armstrong

    I was a little confused by this. What is the code and where to I place it exactly?

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!