From Gnash Project Wiki

Jump to: navigation, search

Haxe Tips

  • Std.is()

Use to test a value for a type, e.g. Std.is("this is a string", String) returns true

  • untyped

This keyword is a haXe hack that allows you to access ActionScript fields that are not in the haXe deffinitions For instance Array.sortOn does not exist in the Array.hx file, so the following code allows you to access that method:

var a = new Array<String>();
untyped a.sortOn(...)

but, be careful, cause there's no compile time checking haxe compiler will just assume you know what you are doing