a few fixes to bring it up to date with haxe (and make it compatible with flash) + on and once convenience methods