Normally, one could perceive several ways in which to optimize this code. For one, both horizontal and
vertical values could be passed together, requiring fewer calls from one layer to the other. Optimizing
further still, one could remove the need to move the whole window, and instead perform the same
animation feat within Flash itself. This would mean that the window itself doesn ??™ t move, but the effect is
the same. The point is that, you need to make sure that the calls you make to the Neko layer are required.
Flash to Neko communication isn ??™ t exactly expensive, but it can add more cost than is necessary and it
does tend to make code seem more complex.
Synchronous Communication in haXe
SWHX provides a synchronous communication system, thanks to the already existent haXe Remoting
API. As you will already know from Chapter 15 , ??? Putting It All Together with haXe Remoting, ??? when
developing web applications using Neko and Flash, both layers can transfer data to each other
seamlessly without the need to convert data types or manually serialize data.
Pages:
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966