I ran into a little problem. We decided to move the folder containing our assets to a shared location
for all of our applications running on the same webserver.
So the assets might be at: http://domain.com/sharedAssets/applicationA
It fails to load the resources because it tries to find 'em in the current folder which is /fancyApplication
Alright after some research I found out that there is an additional parameter to the openfl.embed
function telling it where to look for assets. By the way, it would be nice if something important like
this would be documented somewhere.
app.embed (“openfl-content”, w, h, “63A1FF”,"/sharedAssets/applicationA/");
does the job pretty good - at least for loading sounds. The problem is we’re using swf assets too.
There’s a .json file which tries to load the assets from a subfolder, which is not inside /fancyApplication.
It would be cool if it’s affected by the assetsPrefix parameter too!
Is there anything I could do instead of changing the paths in the .json file by hand?
We have changes in the development version of Lime and OpenFL that I believe will solve this, I haven’t performed specific testing for this on the HTML5 target, but based upon how I’ve redone the asset library system, it’s all based on “root paths” which should be possible to update using that asset prefix value
But where to get and how to use those development builds?
By the way - manually editing the .json file didn’t help. Though it loads the assets
successfully I’m getting other errors:
TypeError: a is null
TypeError: c is null
You can then use
haxelib local path/to.zip for each downloaded file to locally install
Great stuff singmajesty!
This solved my problem. Awesome! I hope you can feel me clapping on your shoulder