Have you ever gone to a website where you have to click to activate a flash control? This is only an issue if your users use IE. A blaring example of this is to open any wordpress page that has Youtube video on it. You have to click it before you can actually click it to start it playing. Microsoft was forced to enable this on their browsers, but there is a very simple solution to the problem that only a few website developers seem to implement.
According to the W3C, IE was used by 57% of the people browsing the internet. If you are using flash on your site and you are not using a workaround for activation, you are annoying over 1/2 your user base. Lucky for you, I have compiled the solution into a simple ASP.NET 2.0 control that you can use. Don’t like ASP.NET? You can take the principals of the workaround and apply them to any language.
The basis for the workaround is that any flash tags written via javascript are immune to the ActiveX activation. The problem that I discovered while building this control is that all browsers behave differently when it comes to javascript. My first version of the control used <noscript>…</noscript> tags to show the control normally if the user has javascript disabled. The problem we found is that Safari does not support noscript tags. On Safari on a mac, no flash would appear. So, I reworked the control to detect the browser version. If it is any version of IE, it uses javascript to write the flash and <noscript>…</noscript> as a backup. For all other browsers, the ActiveX activation is not a problem, so I just write the flash out normally, thus eliminating the pesky javascript issues.
Read more »
November 20, 2007
Posted by
Broken Bokken |
.Net |
ASP.NET, .Net, Programming, Web Development, .Net 2.0, ActiveX, ActiveX Activation, Workaround, Web Control, Flash Activation, Flash, Embedded Resource, Click here to activate, .Net Dojo, Technology |
No Comments