all groups > flash actionscript > april 2004 >
You're in the

flash actionscript

group:

how to pass value from jsfl to actionscript?


how to pass value from jsfl to actionscript? flashin
4/26/2004 11:44:12 PM
flash actionscript:
I have a function written in java script which returns an integer value. say,
fl.myobj.myfunc() should return an integer value. How should I pass the return
to action script? I tried the following, but it doesn't work.

In jsfl,
var v = myObj.func();
fl.trace("value:" + v); // value returned is 10

I tried to call the function in action script:

var v = MMExecute("myObj.myfunc();");
trace("value:" + v); // no value

What did I miss? How to pass function value from Java Script to Action Script?

Re: how to pass value from jsfl to actionscript? mpetty
2/28/2005 4:05:31 PM
While this appears to be an old post, if you or anyone else hasn't figured it
out, you need a return statement in your jsfl.

Example:
function findVal() {
return (count >0) ? true : false;
}

actionscript:
var counter:Boolean =MMExecute("findVal();");

AddThis Social Bookmark Button