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
    MooTools Zebra Tables Plugin

    Tabular data can oftentimes be boring, but it doesn't need to look that way! With a small MooTools class, I can make tabular data extremely easy to read by implementing "zebra" tables -- tables with alternating row background colors. The CSS The above CSS is extremely basic.

  • By
    Highlight Table Rows, Columns, and Cells Using MooTools 1.2.3

    Row highlighting and individual cell highlighting in tables is pretty simple in every browser that supports :hover on all elements (basically everything except IE6). Column highlighting is a bit more difficult. Luckily MooTools 1.2.3 makes the process easy. The XHTML A normal table. The cells...

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!