Search code examples
actionscript-3embedded-resourcehaxe

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?


Solution

  • Haxe allows you to provide external resources info for embedding in hxml.

    You may refer to the doc.