Return to Snippet

Revision: 8427
at September 20, 2008 16:58 by chrisaiv


Initial Code
/*************************************
This is how the SWF Object would look
*************************************/
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">
	var flashVars = { key: "AAA555XXXYYYZZZ", title: "This is my Title" };
	var flashParams = { menu: "false"};
        var flashID = { id : "swfContent" };
	swfobject.embedSWF("main.swf", "swfContent", "550", "400", "9.0.0", "expressInstall.swf",  flashVars, flashParams, flashID);	
</script>

/*************************************
Place this code in the Actions window of Flash CS3
*************************************/

var APP_ID:String = getFlashVars().key;
var title:String = getFlashVars().title;

function getFlashVars():Object
{
 return Object( LoaderInfo( this.loaderInfo ).parameters );
}

Initial URL

                                

Initial Description
For almost every Flash project I present on the web, I use SWFObject and with version 2 out,  it's easier than ever to pass variables.  This is how I collect variables using Flash CS3

Initial Title
AS3: Pass variables using SWFObject2 and AS3

Initial Tags

                                

Initial Language
ActionScript 3