Prev | Current Page 960 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

This means that, while you must register any Neko layer
classes that will be called from Flash, you do not need to register the Flash classes that you will call from
Neko. However, one important point to remember is that, when specifying the class you wish to call
within the Flash movie, you must specify its package path as well as its class name. So, if the class UI
belonged to the package com.flash.graphics , then the proxy call would look like this:
cnx.com.flash.graphics.UI.showData.call( [ d ] );
One final point to discuss about SWHX communication is with regard to return values. Now, this might
seem common sense, but you must try to refrain from making a call from one layer to the next within a
function that itself will be called from the partnering layer. This shouldn ??™ t cause any issues itself in
relation to resource management or application stability, but doing so is very bad from a programming
code of practice perspective, and could result in a perpetual loop that might be very hard to locate,
should numerous functions make calls to each other.


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