HI
I am facing some problem with my as-js communication.I am passing a String expression to a javascript function using ExternalInterfa ce.call function upon mouse click.My string expression is as follows
str="x=callAS(i d)"
Inside my js function i am just using eval(str).callA S(id) contains a call to actionscript function to retrive the value of x using id.I am able to make call to the actionscript by registering the function using ExternalInterfa ce.addCallBack( "callActionScri pt",A SFunction) but the transfer doesnt return to the js on return i.e the value of x is not getting populated with the retrieved value.My function in actionscript is like this
public function ASFunction(id:S tring):Number
{
return 6;
}
This 6 have to be returned to js thereby populating x=6;which is not happening.Any suggestions will be of great help
Cheers
Mfsiddiq
I am facing some problem with my as-js communication.I am passing a String expression to a javascript function using ExternalInterfa ce.call function upon mouse click.My string expression is as follows
str="x=callAS(i d)"
Inside my js function i am just using eval(str).callA S(id) contains a call to actionscript function to retrive the value of x using id.I am able to make call to the actionscript by registering the function using ExternalInterfa ce.addCallBack( "callActionScri pt",A SFunction) but the transfer doesnt return to the js on return i.e the value of x is not getting populated with the retrieved value.My function in actionscript is like this
public function ASFunction(id:S tring):Number
{
return 6;
}
This 6 have to be returned to js thereby populating x=6;which is not happening.Any suggestions will be of great help
Cheers
Mfsiddiq
Comment