[SWFObject] Express Install and Flex2

Andrew Wason rectalogic at rectalogic.com
Thu Jun 29 09:27:31 PDT 2006


Does anyone have any suggestions on the best way to use Express Install 
with Flex2 and SWFObject?

The issues are I can't put the ExpressInstall code on frame 1 since Flex 
doesn't give you frame level access. Also Flex compiles ActionScript to 
ASVM3 which won't execute in earlier Flash players.
http://blog.deconcept.com/swfobject/#expressinstall

I was thinking an approach like below might be best. Setup SWFObject 
with the Flex app swf, then check the player version and if it is not 
correct swap out the swf with the playerProductInstall.swf 
(ExpressInstall swf that comes with Flex Builder) before writing the 
SWFObject into the page.


<div id="flashcontent">
	<a href="http://www.adobe.com/go/getflashplayer">Upgrade</a>.
</div>

<script type="text/javascript">
	// <![CDATA[
	var so = new SWFObject("flexApp.swf", "flex", "300", "200", "9.0.15", 
"#FF6600", true);
	if (!so.installedVer.versionIsValid(so.getAttribute('version'))) {
		so.setAttribute("swf", "playerProductInstall.swf");
	}

	so.write("flashcontent"))
	// ]]>
</script>





More information about the Swfobject mailing list