Prev | Current Page 659 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


In Table 12 - 3 you will notice that many AS functions have no correspondences in haXe; this is not
because haXe developers are lazy, but because many of those functions are deprecated or not useful for
developers in the current days. The Flash environment has been integrated in haXe with a lot of care and
you will find everything you need in the current implementation.
Table 12-3
ActionScript Function
(Flash Version) haXe Equivalent
Array()
(F9)
new Array() or []
The Array() function in AS is a shortcut to create a new instance of
an array. In haXe there is no equivalent function and arrays must be
instantiated using the correct constructor or the square brackets
shortcut.
Table continued on following page
ActionScript Value
(Flash Version) haXe Equivalent
true
(F6??“9)
true
In haXe true is a constructor of the Bool enum.
false
(F6??“9)
false
In haXe false is a constructor of the Bool enum.
newline
(F6??“8)
???\n???
In AS2 it is a constant representing a newline in a string. The same effect
can be obtained in AS3 and haXe using the \n string value.


Pages:
647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671