Haxe snippets.

Reused some from AS3.