Adobe Flash

Example of displaying Adobe flash content.

Spec reference

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Adobe Flash example" summary="" description="" author="" author_email="" thumbnail="" screenshot="" height="380">
<Require feature="opensocial-0.7"/>
<Require feature="flash" />
</ModulePrefs>
 
<Content type="html">
<![CDATA[
	<style>
	html, body {
		margin: 0; /* set the iframed page margin to zero */
		background-color: transparent; /* set the gadget background to transparent */
	}
	</style>
	<div id="flashcontent">
	</div>
 
	<script type="text/javascript">
		var swfVer = "10";
		var flashVersion = gadgets.flash.getMajorVersion();
		var swfUrl = "http://www.example.nl/flashmovie.swf";
 
		function init() {
			// use the embedCachedFlash function with the wmode set to transparent so you flashmovie does not fall behind the Hyves presencebar in the footer and behind the main menu items of the Hyves website
			// if you don't want your flashmovie to be proxied you should use gadgets.flash.embedFlash()
 
			if (flashVersion >= swfVer) {
				gadgets.flash.embedCachedFlash(swfUrl, "flashcontent", swfVer, {base: document.location.host, id: 'example', width: '100%', height: '200', allowScriptAccess: 'always', wmode: 'transparent', flashVars: ''});
			} else {
				//link to the latest flash player, if required
				document.getElementById("flashcontent").innerHTML = 'Get the latest Adobe Flash player <a href="http://get.adobe.com/flashplayer/" target="_blank">here</a> to see this content.';
			}
			gadgets.window.adjustHeight();
		}
		gadgets.util.registerOnLoadHandler(init);
	</script>
]]>
</Content>
 
</Module>

Example install (Make sure you're not in OpenSocial Sandbox mode)

Example file