Jump to content

Internet Explorer using Flash Control


thebeam

Recommended Posts

I got a problem... How can i take off the "click here to active this control" ?When i go trought IE the flash menu needs to be clicked and then it works...And one more thing. Why in the ###### the color is diferent from the Mozilla ?The background of my images, became dark...this is the website.http://www.bsi-brasil.com/see in mozilla e IE and compare.And tell me what did u think about it, the layout, and everything. thanks."I dont know if here its on the correct topic, fill free to manage it to the right place."

Link to comment
Share on other sites

1) Copy this code and name it flash.js to your server.(2) Simply place this following line after the last <object> in your page:<script type="text/javascript" src="fixit.js"></script>Simple as that! Flash files, embedded objects, Active X controls, etc., will all work immediately in your site without the annoyance of the "click to activate" thing ever again!code for the js file

theObjects = document.getElementsByTagName("object");for (var i = 0; i < theObjects.length; i++) {theObjects[i].outerHTML = theObjects[i].outerHTML;}

Link to comment
Share on other sites

See if you replace your menu with this if it works:

<object style="margin: 0 0 0 20px;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="24" onload="this.focus()">    <param name="movie" value="template/flash/MENU.swf">    <param name="quality" value="high">    <embed src="template/flash/MENU.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="24" onload="this.focus()"></embed>  </object>

For some reason I thought you could trigger a click event, but I think I was thinking of Flash itself. I added an onload to the object and embed tags with a call to focus the element. I'm not sure if that will work or not, but it might.

Link to comment
Share on other sites

Flash files, embedded objects, Active X controls, etc., will all work immediately in your site without the annoyance of the "click to activate" thing ever again!
Wow, that's all you have to do? Just replace the code with itself, nice hack.
Link to comment
Share on other sites

  • 2 months later...
1) Copy this code and name it flash.js to your server.(2) Simply place this following line after the last <object> in your page:<script type="text/javascript" src="fixit.js"></script>Simple as that! Flash files, embedded objects, Active X controls, etc., will all work immediately in your site without the annoyance of the "click to activate" thing ever again!code for the js file
theObjects = document.getElementsByTagName("object");for (var i = 0; i < theObjects.length; i++) {theObjects[i].outerHTML = theObjects[i].outerHTML;}

Hi,This is exactly what I'm looking for. My only question is, what do you mean when you say; "1) Copy this code and name it flash.js to your server." This is my first site so I'm very green.ThanksMike
Link to comment
Share on other sites

All you do is copy that code and put it after the objects on your page. For example, if the last flash thing you have on your page is a menu, just put that code underneath the menu code. :)I don't think you need to link to it...

Link to comment
Share on other sites

There are two ways, you can either have the code there itself or put the code in a javascript file and include the javascript file on any page that uses the flash. If you have a lot of pages with flash, using the file is probably easier. So, at the end of your page, you can either do this:

<script type="text/javascript">theObjects = document.getElementsByTagName("object");for (var i = 0; i < theObjects.length; i++) {theObjects[i].outerHTML = theObjects[i].outerHTML;}</script>

Or, you can create a file called flash.js and save this in the file:

theObjects = document.getElementsByTagName("object");for (var i = 0; i < theObjects.length; i++) {theObjects[i].outerHTML = theObjects[i].outerHTML;}

And then write this at the bottom of your pages:<script type="text/javascript" src="flash.js"></script>On a side note, I think it's funny that code actually does this.

Link to comment
Share on other sites

Itried naming the object "object" but that was no good - I figured maybe it was a reserved name or something so I renamed it "media_player" but still no good.This is my file that I call whenever I want an audio file played. Any ideas?

<object classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="application/x-oleobject"	   codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"		standby="Loading Microsoft Windows Media Player components..."		width="60" height="32"		name="media_player">		 <param name="Autostart" value="false">		 <param name="volume" value="100">		 <param name="url" value= "Waves/<?php echo $exhortation_wma; ?>"		 <p>		  ActiveX is not installed or is not working properly.		  If you are using Firefox, please refer to the following Guide:		  <a href="http://forums.mozillazine.org/viewtopic.php?t=206213">		   Embedded Windows Media in Firefox		  </a>		 </p>	   </object>	   	   <script type="text/javascript">theObjects = document.getElementsByTagName("media_player");for (var i = 0; i < theObjects.length; i++) {theObjects[i].outerHTML = theObjects[i].outerHTML;}</script>

ThanksMike

Link to comment
Share on other sites

<script type="text/javascript">theObjects = document.getElementsByTagName("media_player");for (var i = 0; i < theObjects.length; i++) {theObjects.outerHTML = theObjects.outerHTML;}</script>That wouldn't work because there aren't any HTML tags called "<media_player>" :) I don't think that script works anyway. How would setting its outerhtml to the same thing fix anything?Edit- Hey awesome! If you uninstall the "KB912945" microsoft update from your add/remove program list, the click-to-activate thing will stop :)

Link to comment
Share on other sites

Found it. Save the following code as a file.

<script language="JavaScript" type="text/javascript"><!--function writeJS(){var str='';str+='<object classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="application\/x-oleobject"';str+='	   codebase="http:\/\/activex.microsoft.com\/activex\/controls\/mplayer\/en\/nsmp2inf.cab#Version=6,4,5,715"';str+='		standby="Loading Microsoft Windows Media Player components..."';str+='		width="60" height="32"';str+='		name="media_player">';str+='		 <param name="Autostart" value="false">';str+='		 <param name="volume" value="100">';str+='		 <param name="url" value= "Waves\/<?php echo $exhortation_wma; ?>"';str+='		 <p>';str+='		  ActiveX is not installed or is not working properly.';str+='		  If you are using Firefox, please refer to the following Guide:';str+='		  <a href="http:\/\/forums.mozillazine.org\/viewtopic.php?t=206213">';str+='		   Embedded Windows Media in Firefox';str+='		  <\/a>';str+='		 <\/p>';str+='	   <\/object>';document.write(str);}writeJS();//--></script>

Now put this where your object is:

<script type="text/javascript" src="your code url.js"></script>

It should work in IE, as it's loaded by a script. Hope that helps!Choco (PS-I mean to remove your current object code and replace it with this.)

Link to comment
Share on other sites

I don't think that script works anyway. How would setting its outerhtml to the same thing fix anything?
People have reported that it works (I've never tried it). It looks like it doesn't do anything, but something about dynamically setting the HTML (even if it's the same thing) stops IE from looking at that element as a candidate for this. It's stupid anyway, Microsoft was forced to do this because some company came out of nowhere and claimed they have a patent on "embeddable content" or some such crap, so in order to avoid paying that company a license fee, this is the workaround: people have to click on the content to use it. It's stupid all around, and as a result things like this happen.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...