use haxe substring instead of substr for as3 slice method