package;  import openfl.display.Bitmap; import openfl.display.Sprite; import openfl.Assets;  class Main extends Sprite {      public function new () {          super ();          var bitmapData = Assets.getBitmapData ("assets/openfl.png");         var bitmap = new Bitmap (bitmapData);         addChild (bitmap);      }  }

<vbox>

	<text text="Hello World from XML!" id="label" />

	<button text="Click Me!" id="button" />

</vbox>

   class HelloWorld {         static public function main() {             trace("Hello World");         }     }

   abstract Kilometer(Float) {         public function new(v:Float) this = v;     }      abstract Mile(Float) {         public function new(v:Float) this = v;         @:to public inline function toKilometer():Kilometer return (new Kilometer(this / 0.62137));     }      class Test {       static var km:Kilometer;       static function main(){         var one100Miles = new Mile(100);         km = one100Miles;          trace(km); // 160.935       }     }

class Main<A:B> {     static function main() {         new Main<String>("foo");         new Main(12); // use type inference     }      function new(a:A) { } }