Amazon S3 and Flash widgets

Today, I wanted to load a Flash widget of mine and its corresponding XML configuration file to Amazon S3.

What appeared to be a trivial task turned into 3 hours of struggle with browser cache problems, security issues and other whatnots.

So to summarise what did the job eventually:

*updated to support IE7*

The address of the Flash file is:

<script language=”javascript”>
if (AC_FL_RunContent == 0) {
alert(“This page requires AC_RunActiveContent.js.”);
} else {
‘codebase’, ‘,0,0,0’,
‘width’, ‘220’,
‘height’, ‘200’,
‘src’, ‘’,
‘quality’, ‘high’,
‘pluginspage’, ‘’,
‘align’, ‘right’,
‘play’, ‘true’,
‘loop’, ‘true’,
‘scale’, ‘showall’,
‘wmode’, ‘window’,
‘devicefont’, ‘false’,
‘id’, ‘flashfile’,
‘bgcolor’, ‘#ffffff’,
‘name’, ‘flashfile’,
‘menu’, ‘true’,
‘allowFullScreen’, ‘false’,
‘movie’, ‘’,
‘salign’, ”
); //end AC code
<object classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ codebase=”,0,0,0″ width=”220″ height=”200″ id=”flashfile” align=”right”>
<param name=”allowScriptAccess” value=”sameDomain” />
<param name=”allowFullScreen” value=”false” />
<param name=”movie” value=”” /><param name=”quality” value=”high” /><param name=”bgcolor” value=”#ffffff” /> <embed src=”” quality=”high” bgcolor=”#ffffff” width=”220″ height=”200″ name=”flashfile” align=”right” allowScriptAccess=”always” allowFullScreen=”false” type=”application/x-shockwave-flash” pluginspage=”” />

In order to be able to load the XML and other files, I had to add this to Actionscript (at the beginning of the movie): ‘*’ );

This allows cross-domain scripting, of course you can substitute the * with a specific domain name.

Some references: link1, link2

Post Details


Web development




Leave a Comment