I want to pass the result of a js function into actionscript when the js function is called from actionscript. The js parses a url and returns the var in the url. In actionscript the functions are declared:
function gup(name1:String) :void {
flash.external.ExternalInterface.call("gup", name1);
}
function printAlert(group2:String) :void {
flash.external.ExternalInterface.call("printAlert", group2);
}
then later in actions I call gup() which should return the var which I turn around and print as an alert to check what value is there. "group" is the name of the var I want to get out of the url to use for branching in the swf. If I just define whichGroup the alert works fine. trying to get the return value of the js function the alert value is null
var whichGroup = gup("group");
printAlert(whichGroup);