Prev | Current Page 958 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

txt . If you then right - click the Flash movie, you invoke the onRightClick event,
which forces the Neko layer to read the content of the text file into a variable, and send it to the
showData function in the Flash layer, which writes it to the second text field.
So, how does this work? You ??™ ll notice, primarily, a couple of lines of code within each class that handles
the sending of data from one layer to the other. In the Flash layer, it reads:
var cnx = swhx.Connection.desktopConnect();
cnx.App.writeData.call( [ ???test.txt???, send_tf.text ] );
Here, a connection object is created from the command swhx.Connection.desktopConnect . The
connection object is then used to proxy the call to the writeData method of the NekoLayer class,
sending it the string test.txt and the content of the send_tf text field.
So, then, how does the call know what method from what class it is calling? Well, let ??™ s examine the call
proxy code in detail:
cnx.App.writeData.call( [ ???test.txt???, send_tf.text ] );
This line can be analyzed as:
[connection obj].


Pages:
946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970