Hi there,
Since openFL 8.1.1 and Lime 6.3.1, when we try to load a .bundle using
AssetLibrary.loadFromFile(“bundle/ui.bundle”);
we have a 404 error (or strange 0 error in minimalist test project)
[IOErrorEvent type=“ioError” bubbles=true cancelable=false text=“404” errorID=404]
[IOErrorEvent type=“ioError” bubbles=true cancelable=false text=“0” errorID=0]
The asset path is correct (loading work perfectly with openfl 7.1.2 and lime 6.2.0)
We use this command line to convert swf into .bundle
openfl process ui.swf ui.bundle
We have made a minimalist openfl project to test the loading, and we have the same error :
class Main extends Sprite
{
private var m_futureLib : Future<AssetLibrary>;
public function new()
{
super();
m_futureLib = AssetLibrary.loadFromFile("bundle/ui.bundle");
m_futureLib.onProgress(onProgress);
m_futureLib.onError(onError);
m_futureLib.onComplete(onComplete);
}
private function onError(e : Dynamic)
{
trace(e);
}
private function onProgress(prog : Int, total : Int)
{
trace(prog / total);
}
private function onComplete(lib : AssetLibrary)
{
trace("done");
}
}
with this project.xml :
<?xml version="1.0" encoding="utf-8"?>
<project>
<!-- NMML reference: https://gist.github.com/1763850 -->
<!-- metadata, make sure 'package' is at least 3 segments (ie. com.mycompany.myproject) -->
<meta title="testBundle" package="fr.test.testBundle" version="1.0.0" company="test" />
<!-- output -->
<app main="Main" file="testBundle" path="bin" />
<window background="#000000" fps="60" />
<window width="800" height="480" unless="mobile" />
<window orientation="landscape" vsync="false" antialiasing="0" if="cpp" />
<!-- classpath, haxe libs -->
<source path="src" />
<haxelib name="openfl" />
<haxelib name="actuate" />
<!-- assets -->
<icon path="assets/openfl.svg" />
<assets path="assets/bundle" rename="bundle" embed="false"/>
<!-- optimize output
<haxeflag name="-dce full" /> -->
</project>
We notice this change in Lime between the 2 versions : https://github.com/openfl/lime/commit/09923d5777bea5cbf9722bdf8c4eb0237b5dcedc
have we missed something about loading method ?
thx for help