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

  • By
    How I Stopped WordPress Comment Spam

    I love almost every part of being a tech blogger:  learning, preaching, bantering, researching.  The one part about blogging that I absolutely loathe:  dealing with SPAM comments.  For the past two years, my blog has registered 8,000+ SPAM comments per day.  PER DAY.  Bloating my database...

  • By
    How to Create a RetroPie on Raspberry Pi &#8211; Graphical Guide

    Today we get to play amazing games on our super powered game consoles, PCs, VR headsets, and even mobile devices.  While I enjoy playing new games these days, I do long for the retro gaming systems I had when I was a kid: the original Nintendo...

Incredible Demos

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!