This Flash movie retrieves data stored in the HTML. The Flash LoaderInfo class retrieves data stored in the "flashvars" parameter of the HTML. Because of how Adobe currently configures the HTML and JavaScript which runs the Flash movie, you have to include the flashvars parameters in three places:
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '700',
'height', '250',
'src', 'as3_loader_info',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'as3_loader_info',
'bgcolor', '#cccccc',
'name', 'as3_loader_info',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'movies/as3_loader_info',
'flashvars', 'myParameter1=javascript&myParameter2=enabled!&myParameter3=dog', // NOTE FLASHVARS HERE AND TWO OTHER PLACES
'salign', ''
); //end AC code
}
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="700" height="250" id="as3_loader_info" align="middle">
<param name="flashvars" value="myParameter1=noscript&myParameter2=param%20tag&myParameter3=cat" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="movies/as3_loader_info.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#cccccc" /> <embed src="movies/as3_loader_info.swf" flashvars="myParameter1=also%20noscript.&myParameter2=embed%20tag&myParameter3=elephant" quality="high" bgcolor="#cccccc" width="700" height="250" name="as3_loader_info" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
//---------------------------------------------------------
// define text format to be used by all 3 text boxes:
var myTextFormat:TextFormat = new TextFormat("Arial",18,0,true);
//---------------------------------------------------------
// define the 3 text boxes:
var flashvars1_txt:TextField = new TextField;
flashvars1_txt.defaultTextFormat = myTextFormat;
flashvars1_txt.x = 250;
flashvars1_txt.y = 100;
flashvars1_txt.width = 400;
flashvars1_txt.height = 30;
flashvars1_txt.border = true;
flashvars1_txt.background = true;
flashvars1_txt.backgroundColor = 0xffffff;
addChild(flashvars1_txt);
var flashvars2_txt:TextField = new TextField;
flashvars2_txt.defaultTextFormat = myTextFormat;
flashvars2_txt.x = 250;
flashvars2_txt.y = 150;
flashvars2_txt.width = 400;
flashvars2_txt.height = 30;
flashvars2_txt.border = true;
flashvars2_txt.background = true;
flashvars2_txt.backgroundColor = 0xffffff;
addChild(flashvars2_txt);
var flashvars3_txt:TextField = new TextField;
flashvars3_txt.defaultTextFormat = myTextFormat;
flashvars3_txt.x = 250;
flashvars3_txt.y = 200;
flashvars3_txt.width = 400;
flashvars3_txt.height = 30;
flashvars3_txt.border = true;
flashvars3_txt.background = true;
flashvars3_txt.backgroundColor = 0xffffff;
addChild(flashvars3_txt);
//---------------------------------------------------------
// store the LoaderInfo data from the html into myLoaderInfo:
var myLoaderInfo:Object = LoaderInfo(this.root.loaderInfo).parameters;
//---------------------------------------------------------
// copy each parameter from myLoaderInfo to a text field:
var myParm1:String = myLoaderInfo["myParameter1"];
flashvars1_txt.text = myParm1;
var myParm2:String = myLoaderInfo["myParameter2"];
flashvars2_txt.text = myParm2;
var myParm3:String = myLoaderInfo["myParameter3"];
flashvars3_txt.text = myParm3;