how would you rate The Holy Qura'an - Arabic ver?

Saturday, March 12, 2011

Passing parameters from HTML to swf(Flash Builder) AS3

I spent countless hours to get this done. Pulled my hair broke my glasses and kicked out my cat all because of lack of finding the right directions on how to get it done.

simple as this:

your flex file is ready! OK

private var in1:String;
private function initHandler():void {
var obj:Object = this.parameters;
in1= obj.name;
Alert.show("OK " + in1);

There goes the flex file
Now, when you publish your project using the project>Export Release Build... you need to edit the exported html file (it should be under the same name as your project). So go and edit it

Find the line

//within the 3rd [script] and after (REPLACE [ WITH < )
var xiSwfUrlStr = "playerProductInstall.swf";
//add this line
flashvars.in1= "WELCOME"; // don't forget ;
var ver= {};
var params = {};

//then you will have [nonscript][object]

//then another[object]