Nov 30

The html/php first:

	// if we've detected an acceptable version
	// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
			"src", "${swf}?myName=<?php echo $myname; ?>&myHometown=<?php echo $mytown; ?>",
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initVars()">
  <mx:Script><![CDATA[
     // Declare bindable properties in Application scope.
     [Bindable]
     public var myName:String;
     [Bindable]
     public var myHometown:String;
 
     // Assign values to new properties.
     private function initVars():void {
        //myName = Application.application.parameters.myName;
        myHometown = Application.application.parameters.myHometown;
 
        myName = mx.core.Application.application.parameters.myName

The good thing about this method is this is the only place it has to be put, not twice.

Also, this is limited to two things, but you could theoretically pass many variables.

Leave a Reply