Prev | Current Page 665 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


unescapeMultiByte()
(F9 in flash.utils)
Not implemented.
Table continued on following page
Part II: Server Side, JavaScript, and Flash: Oh My!
352
Operators
The vast majority of operators in AS have been mapped equally in haXe. The most notable exceptions
or the one that needs some further descriptions are described in Table 12 - 4 ; others of less common use
have been omitted.
Table 12-4
ActionScript Operator
(Flash Version) haXe Equivalent
Array access
operator: []
(F6??“9)
[]
The array access operator works the same for the three forms of syntax for
creating and accessing array elements. In haXe, because arrays are
strongly typed and no type parameter can be expressed with this syntax,
the type of the array is inferred by the most accommodating type for the
elements existing at the moment of the declaration.
// ???arr??? has type Array
var arr = [???a???, ???b???];
// ??? arr ??? has type Array
var arr = [???a???, 1];
// ??? arr ??? has type Array but the array
// on the right side has type Array
var arr : Array = [0, 1];
as
(F9)
There is no direct equivalent but you can obtain the same effect with
something like the following:
var b;
try { b = cast(a, B); }
catch(e :Dynamic){ b = null; }
ActionScript Function
(Flash Version) haXe Equivalent
unloadMovie()
(F6??“8)
Use the unloadMovie() method of a flash.


Pages:
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677