Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Getting rid of "click to activate" for .swf files in IE

Getting rid of "click to activate" for .swf files in IE
Thread Tools
Apple Pro Underwear
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status: Offline
Reply With Quote
May 8, 2007, 02:20 PM
 
Getting rid of "click to activate" for .swf files in IE


Anybody else get that crap on IE? My client wants it gone but I want to use a simple .css solution if possible rather than using some bullshyt javascript that looks hard.

javascript
Geert Verhoeven: Get rid of "Click to activate and use this control"

stupid microsoft support pages
Internet Explorer ActiveX update
     
andi*pandi
Moderator
Join Date: Jun 2000
Location: inside 128, north of 90
Status: Offline
Reply With Quote
May 8, 2007, 02:24 PM
 
the javascript isn't that hard... flash 8 can export it automatically. the only problem is if people turn off javascript, right?
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
May 8, 2007, 03:41 PM
 
If only Eolas v. MS had been after the supreme court's recent ruling on patent obviousness, maybe we wouldn't have to deal with this stupidity.
     
Ozmodiar
Mac Elite
Join Date: Apr 2002
Location: Quetzlzacatenango
Status: Offline
Reply With Quote
May 8, 2007, 07:46 PM
 
Dreamweaver will automatically do this for you, but it breaks validation. I've never seen a CSS solution for it.
     
Apple Pro Underwear  (op)
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status: Offline
Reply With Quote
May 9, 2007, 04:48 PM
 
what do you mean "dreamweaver automatically" does it for you? the javascript insertion?

yeah, i suppse the js is not hard especially since it calls to a external file but still... it seems so stupid considering it's only IE.
     
Ozmodiar
Mac Elite
Join Date: Apr 2002
Location: Quetzlzacatenango
Status: Offline
Reply With Quote
May 10, 2007, 12:13 AM
 
I don't have Dreamweaver in front of me, but I'm pretty sure if you just go Insert > Flash > Movie it will write out all the code, including the script, embed, and object tags. Then it creates a Scripts folder at the root level with a .js file in called something like AC_somethingsomething.

Or, if you already have the code on the page but did it in a program outside of Dreamweaver, just open it in DW and it will detect the Flash and ask you if you want to "update" the code referencing it.
     
andi*pandi
Moderator
Join Date: Jun 2000
Location: inside 128, north of 90
Status: Offline
Reply With Quote
May 10, 2007, 11:06 AM
 
in flash if you publish with html, then click the command pulldown to "apply active Content Update" it adds a link to this javascript file called AC_RunActiveContent.js (as well as other stuff that you could delete if you were fussy about code clutter):

//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
if (src.indexOf('?') != -1)
return src.replace(/\?/, ext+'?');
else
return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs)
{
var str = '<object ';
for (var i in objAttrs)
str += i + '="' + objAttrs[i] + '" ';
str += '>';
for (var i in params)
str += '<param name="' + i + '" value="' + params[i] + '" /> ';
str += '<embed ';
for (var i in embedAttrs)
str += i + '="' + embedAttrs[i] + '" ';
str += ' ></embed></object>';
document.write(str);
}
and adds this to the HTML:

<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
'width', '728',
'height', '90',
'src', 'indiaAd-L',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'indiaAd-L',
'bgcolor', '#ffffff',
'name', 'indiaAd-L',
'menu', 'true',
'allowScriptAccess','sameDomain',
'movie', 'indiaAd-L',
'salign', ''
); //end AC code
}
</script>
(hmm, I guess we don't have code or pre tags anymore?)
( Last edited by andi*pandi; May 30, 2007 at 07:57 PM. )
     
Apple Pro Underwear  (op)
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status: Offline
Reply With Quote
May 16, 2007, 05:39 PM
 
Hi guys, THANKS FOR THE HELP!

I found this open source project:

jActivating - Solution to "Click to activate and use this control" issue


and it works great and keeps the html and .js separate and very manageable. Seems to be pretty clean to me... hope it helps you guys,
     
andi*pandi
Moderator
Join Date: Jun 2000
Location: inside 128, north of 90
Status: Offline
Reply With Quote
May 21, 2007, 09:05 AM
 
color me ignorant, (it's a pretty shade of purple) but why is that javascript better than the macromedia/adobe javascript?
     
Apple Pro Underwear  (op)
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status: Offline
Reply With Quote
May 24, 2007, 04:32 PM
 
For whatever reason, I got it to work with their solution and am happy it's clean and works.

I'm grateful for your help but I had trouble either following your instructions or it was a bit over my head.
     
Chris O'Brien
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status: Offline
Reply With Quote
May 26, 2007, 05:36 PM
 
Originally Posted by andi*pandi View Post
color me ignorant, (it's a pretty shade of purple) but why is that javascript better than the macromedia/adobe javascript?
Well, picture it. You write your page as nature intended it. You put the <object> tag in your HTML where you want it and it works fine in all browsers. The only problem is the unfortunate workarounds the IE team had to implement because of this patent nonsense.

Now, rather than having to include lots of printed javascript etc in your source and adding events manually to work around this, you have this rather nice solution which is just one script include and the rest is done with no changes to your markup and no other thought involved.

I think having your nice clean source suffering just one extra <script> tag is far superior to the Adobe/Macromedia solution

Of course, it's in the eye of the beholder; many people don't care how atrocious the source of their page is, as long as it looks/functions as they like. It's a personal choice
Just who are Britain? What do they? Who is them? And why?

Formerly Black Book
     
andi*pandi
Moderator
Join Date: Jun 2000
Location: inside 128, north of 90
Status: Offline
Reply With Quote
May 26, 2007, 09:12 PM
 
??? The adobe/macromedia solution is one <script> tag, that links to one external javascript...

[edit: ok, and some other stuff that I bet you can ignore if you're concerned with code pollution.]
( Last edited by andi*pandi; May 30, 2007 at 07:58 PM. )
     
Chris O'Brien
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status: Offline
Reply With Quote
May 27, 2007, 05:27 AM
 
It is? But your previous post says

Originally Posted by andi*pandi
and adds this to the HTML:

<snip>
Have I read wrong or is that not stuff polluting your HTML?
Just who are Britain? What do they? Who is them? And why?

Formerly Black Book
     
Phil Sherry
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status: Offline
Reply With Quote
May 28, 2007, 02:37 PM
 
I'm sat next to Chris right now, and he's looking confused by this thread.
     
Apple Pro Underwear  (op)
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status: Offline
Reply With Quote
May 31, 2007, 06:57 PM
 
Well, one thing about the Adobe/Macromedia solution is that it's official right? The solution I'm using is by some dude (team) in a open source project. So far, my client's site has been perfect but I'll have to keep on top of it just in case something breaks it.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:38 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,