Hi,
I am having a lot of problems using OpenFlump: images and animations do not appear!
I have isolated the interested code and created a basic project to show you
package;
import openfl.display.Sprite;
import com.michaelgreenhut.openflump.FlumpMovie;
import com.michaelgreenhut.openflump.FlumpParser;
class Main extends Sprite {
public function new() {
super();
FlumpParser.get().loadPath("assets/Animations/resources.xml");
var stdAnimation: FlumpMovie = FlumpParser.get().getMovieByName("hydra");
addChild(stdAnimation);
stdAnimation.play();
}
}
In the project.xml I have added
<haxelib name="openFlump" />
and
<assets path="assets/Animations" />
where Animations contains the atlas PNG and its XML.
The atlas XML is this
<resources md5="0aa842c978bd66af2234cb53d765ee90" isNamespaced="false">
<movie name="hydra" frameRate="30">
<layer name="flipbook" flipbook="true">
<kf duration="1" ref="hydra_flipbook_0" tweened="false"/>
<kf duration="1" ref="hydra_flipbook_1" tweened="false"/>
<kf duration="1" ref="hydra_flipbook_2" tweened="false"/>
<kf duration="1" ref="hydra_flipbook_3" tweened="false"/>
</layer>
</movie>
<textureGroups>
<textureGroup scaleFactor="1">
<atlas file="Animations/atlas0.png">
<texture name="hydra_flipbook_0" rect="221,1,218,168" origin="0,0"/>
<texture name="hydra_flipbook_1" rect="441,1,218,168" origin="0,0"/>
<texture name="hydra_flipbook_2" rect="661,1,218,168" origin="0,0"/>
<texture name="hydra_flipbook_3" rect="881,1,218,168" origin="0,0"/>
</atlas>
</textureGroup>
</textureGroups>
</resources>
The application (targeting Flash) does not show anything at all, but traces
FlumpParser.hx:160: made movies
What’s wrong?