Flash to JavaScript
If you thought that communicating with Flash from JavaScript was easy, sending method calls to JavaScript from Flash is as simple as the following line of code:
proxy.call("highlightItem ", this.lender, "#ebebeb");
The JavaScriptProxy.call()takes the JavaScript method name written earlier and any number of parameters that you want to pass it. In the sample, I pass the highlightItem() method two parameters: the lender name and a hex value to change the background color of the div in the HTML for a particular lender. This provides the user immediate visual feedback and makes the content more effective.