Magic functions

Magic functions are special functions that should be handled with care—they are very useful to interface with your target platform, but they can produce undefined behavior if they are not correctly used. In addition, they do not provide any kind of typing as they can only be used inside an untyped block.

Available magic functions are different from one platform to another and therefore, if you are targeting several platforms, you really have to be careful and should consider using conditional compilation.

The Flash magic

The Flash platform is certainly the one with the most magic functions. Certainly, you will not use all of them straight away, but they can always be useful. So, let's go on with them.

In addition, some of them are ...

Get haXe 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.