Update: Flex and Open Social

Working with the crew from Hi5 (thanks guys, you really make things easier), we determined that in the latest containers, embedding flash in your application is as easy as using the gadgets.flash.embedCachedFlash function.  Here is an example:

<?xml version=”1.0″ encoding=”UTF-8″ ?>
<Module>
<ModulePrefs title=”Open Social App” author_email=””>
<Require feature=”opensocial-0.7″ />
<Require feature=”flash” />
</ModulePrefs>
<Content type=”html”>
<![CDATA[

<script type=”text/javascript”>

_IG_RegisterOnloadHandler(init);

var flexAppId = “OpenSocial”;

function init() {
loadFlash();
}

function loadFlash()
{
var swfUrl = “url - to - your - swf”;
gadgets.flash.embedCachedFlash(swfUrl, “flashcontainer”, {id: flexAppId, width: 500, height: 500 });
}

function getFlexApp(appName)
{
if (navigator.appName.indexOf (”Microsoft”) !=-1) {
return window[appName];
} else {
return document[appName];
}
}

</script>

<div id=”flashcontainer” style=”text-align: center;” width=”500″ height=”500″></div>

]]>
</Content>
</Module>

Leave a Reply