Adobe's Active Content Fix

So, I don't know about you, but since I don't use the devils' browser, I really haven't been too concerned about the upcoming (now here) EOLAS update which impacts Flash. When the update was rolled out and my project manager noticed the change on a client site, it was time to correct it.

So I took a look at Adobe's Active Content Developer Center and was surprised at how simple their fix was. Luckily my company's CMS system has a custom tag to spit out the code for Flash SWFs. All I had to do was modify that. The code change in question could not be simpler, I mean, look at this:

<script>
AC_FL_RunContent(
   'movie', 'filenameWithOutSWF',
   'width','48',
   'height','1516',
   'id','myidiscoolerthanyourid');
</script>

Shoot, even if this IE change had not happened, this would have been a useful little script to get Flash onto a page.

I just wanted to make sure people knew about this fix. I was actually surprised by how fast I was able to fix the client's code with this.

One little note. I wasn't sure how to handle FlashVars. I thought they were special and the JavaScript code that Adobe provided didn't have a way to handle them. Duh. FlashVars are just one more property. Here is a modified version of the code above.

<script>
AC_FL_RunContent(
   'movie', 'filenameWithOutSWF',
   'width','48',
   'height','1516',
   'id','myidiscoolerthanyourid',
   'FlashVars','msg=DharmaWasHere&station=Swan'
);
</script>

Truly simple and elegant solution. Thanks Adobe!

Comments

We moved everything to swfobject http://blog.deconcept.com/swfobject/ which worked great as well.
# Posted By Brian Rinaldi | 4/25/06 8:40 AM
I've heard good things about it as well. I'm not using it, but I think a coworker is.
# Posted By Raymond Camden | 4/25/06 8:43 AM
Hey ray, does this work for flash forms as well? If so, Im not sure how you would implement it...
# Posted By Ryan Guill | 4/25/06 9:00 AM
Yes, pretty simple. :) The free extension from Adobe adds a Publishing (HTML) template and a Command (to ask where to save the JS include file). So, yes, pretty simple.

I see FlashObject, er now, SWFobject (SWFo) has an update as well. I really, really like how SWFo handles FlashParams. Adobe's solution isn't bad, but I like to parse in params with server-side code and Adobe's solution for FlashParams seems arcane for now. For now.
# Posted By Chris Charlton | 4/25/06 9:05 AM
Ryan, no, it is not for Flash Forms or CFCHART. Adobe is working on that though.
# Posted By Raymond Camden | 4/25/06 9:12 AM
Apple implemented javascript code and functions for embedding quicktime as well.
http://www.apple.com/quicktime/tutorials/embed.htm...
# Posted By Kyle Hayes | 4/25/06 10:09 AM
I'll second FlashObject / SWFObject ... I started using it recently and it's working like a charm.
# Posted By Rob Gonda | 4/25/06 6:30 PM
But does it work with javascript disabled ?
NoScript is the 2nd most popular extension for firefox at the moment, and as a NoSCript user I have to say it's bliss. I'm already blocking flash, but I can enable it with a click, however if javascript is used to generate the flash, I'll probably never see it and just move on to another site.
# Posted By Bjorn Jensen | 4/26/06 2:09 AM
It does not work with JS disabled. I believe the Adobe site mentions that in the noscript you can use the 'old' object/embed stuff so that at least they _get_ the flash, but just have to click first.
# Posted By Raymond Camden | 4/26/06 5:40 AM
As infuriating as this situation is because of Eolas, I have to call shenanigans in part on Adobe.

MS announced this change months ago, patches for CF should have been ready to go, and I didn't even hear about the revised Flash publish templates until I saw it on John Dowdell's blog days after the IE patch was released.

Not to nitpick too hard, but I didn't see any kind of statement from Adobe on the lawsuit either. I know companies like to avoid getting sued, but I think developers would feel better if mama bear flashed her teeth at Mike Doyle.

Especially after <a href="http://www.eweek.com/article2/0,1895,1944867,00.as...; target="_blank>these comments from Eolas COO Mark Swords.
</a>
# Posted By PaulC | 4/26/06 2:05 PM
I can't get FlashVars to work in IE6 or Firefox 1.5.0 and when I searched adobe flash forum for 'active AND content AND FlashVars' I found posts mentioning that FlashVars doesn't work. What browser are you using?
# Posted By J | 6/29/06 8:14 PM
Ray,

In a comment above 3 months ago, responding to Ryan's question about an Active Content fix for "Flash Forms or CFCHART" you wrote "Adobe is working on that".

Have you heard if Adobe has released a fix? I checked the CF 7.0.2 updater and do not see it called out specifically.

Thanks,

g
# Posted By Greg H | 7/27/06 11:15 AM
It is there.
# Posted By Raymond Camden | 7/27/06 11:19 AM
This article saved my sanity.
# Posted By Z | 8/28/08 9:27 AM
I know this is an old article so I apologize for reopening.

The AC_FL_Runcontent works great for FF 3 but IE will load my swf but not play it (background shows but nothing else) as soon as i put in 'FlashVars','xmlfile=#imageXML#&xmlfiletype=Default',

Anyone have any ideas as to why or how to fix?

Thanks!
# Posted By DJ | 10/24/08 1:24 PM
What is #imagexml#? It doesn't have a space in it, does it?
# Posted By Raymond Camden | 10/24/08 3:35 PM