Lime Assets load fail

hi folks,
i have some problems using Lime on this functions targeting html on neko work fine :frowning:

file = Assets.getBytes(“assets/Blade.md2”);
var data = Assets.getText(“assets/blade.txt”);

but if i use Openfl works :frowning: some one?

What are the errors?

hi Josh,
TypeError: this.file is null on Mozilla

Uncaught TypeError: Cannot set property ‘littleEndian’ of null on chrome

OpenFL (without -Dlegacy) uses lime.Assets getBytes and getText directly, so I’m not sure why those would work differently.

Would it be any trouble to make a simple sample that reproduces the problem?

yes josh :wink:
source code
as I said before with Openfl works well but for my project i just need Lime

Ah! Got it working :smile:

Try overriding onPreloadComplete in your “com.gdx.App” class.

In HTML5, the window is created before the preloader has finished loading, so a call to getBytes fails :wink:

woow josh you the man :wink:

public override function onPreloadComplete()
{
start = true;
OnStart();
}

and i can track the assets loader :stuck_out_tongue: very god .

1 Like