Prev | Current Page 805 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


The file must contain the following PHP code:
< ?php
class Calc {
function Calc() {
$this- > methodTable = array (
???sum??? = > array (
???access??? = > ???remote???,
???description??? = > ???Executes a sum???));
}
function sum($x, $y) {
return $x +$y;
}
}
? >
Chapter 15: Putting It All Together with haXe Remoting
435
FlashJsConnection
The haxe.remoting.FlashJsConnection class connects two Flash movies using JavaScript as a
bridge Table 15-5. The client movie identifies the server movie using the id attribute of the HTML
element that is used to embed it.
To make a FlashJsConnection work, you must also provide a JavaScript file compiled with haxe that
will act as a bridge. Such a file can be an .hx file containing just the following line of code:
import haxe.remoting.FlashJsConnection;
LocalConnection
The haxe.remoting.LocalConnection class relies on the Flash LocalConnection API implementation.
This channel of communication permits the exchange of messages between different Flash movie
instances that may also be located in different contexts (not on the same web pages).


Pages:
793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817