|
|
Getting rid of "click to activate" for .swf files in IE
|
|
|
|
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Moderator
Join Date: Jun 2000
Location: inside 128, north of 90
Status:
Offline
|
|
the javascript isn't that hard... flash 8 can export it automatically. the only problem is if people turn off javascript, right?
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Apr 2002
Location: Quetzlzacatenango
Status:
Offline
|
|
Dreamweaver will automatically do this for you, but it breaks validation. I've never seen a CSS solution for it.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Apr 2002
Location: Quetzlzacatenango
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Moderator
Join Date: Jun 2000
Location: inside 128, north of 90
Status:
Offline
|
|
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.
)
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Moderator
Join Date: Jun 2000
Location: inside 128, north of 90
Status:
Offline
|
|
color me ignorant, (it's a pretty shade of purple) but why is that javascript better than the macromedia/adobe javascript?
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
Originally Posted by andi*pandi
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
|
|
|
|
|
|
|
|
Moderator
Join Date: Jun 2000
Location: inside 128, north of 90
Status:
Offline
|
|
??? 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.
)
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
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
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status:
Offline
|
|
I'm sat next to Chris right now, and he's looking confused by this thread.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|