I use it to get info or do things that JavaScript has access to, and that I don't, for example, doing alerts. You can pass it parameters and get data from it.
There may be issues with testing it locally though.
Example:
var val:Number = ExternalInterface.call('funcName','parameter1','parameter2');
The first parameter is the name of the javascript function on the html page, the others are parameters to be passed to the function.
On your html page, you would have something like:
<script type="text/javascript"> function funcName(text1,text2){ return text2; } </script>
Of course, that would be completely useless, but I don't deal with JavaScript much, and that is what I could come up with off the top of my head. Pathetic, huh?
Anyway...
No comments:
Post a Comment
Please enter your message here...