After using OpenFL and Haxe for several years I am surprised that I’ve never encountered this issue before:
I need to be able to serve my assets from a url that is not relative to the hosting page’s url.
E.g. If my game is at
http://example.com/my/game
then I need my assets to be somewhere other than
http://example.com/my/game/assets/
, say,
http://example.com/storage/games/my-game/assets
instead.
I think this may be possible by switching from Assets.getXXX to Assets.loadXXX methods, but that would require rewriting much of the current logic of my game to handle the futures.
This is for a client for whom I am trying to finish swiftly, so I wondered if there is a quicker way.
I guess another way to ask it is: can I still do preloading of assets that are found outside the serving page’s hierarchy? And if so, how do I tell OpenFL about that preference?
I have asked the client if they are able to insert a symlink from assets/ to /storage/games/my-game/assets/ but they may not be able to depending upon their hosting environment.
You can override the standard template by creating “templates/html5/template/index.html” (with your own modified copy) and adding <template path="templates" /> to your project.xml