Haxe — Embed files like in ActionScript?
问题 In ActionScript, you can do something like this: [Embed(source = "src/myfile.xml", mimeType = "application/octet-stream")] private var xml : Class; and it will embed your file to be used in code. How can i do something similar in Haxe? 回答1: Haxe allows you to provide external resources info for embedding in hxml. You may refer to the doc. 回答2: Things have changed since the time the question was asked. With a modern version of haxe one can do: @:bitmap("test.png") class TestBMD extends