OpenFlump usage

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?

Yeah, where is the button for “watch movies”? :wink:

Maybe the FlumpMovie didn’t get any layers

What do you mean about the layers? Are you talking about the XML?

I think I have found a couple bugs in the OpenFlump wrapper, I am trying to fix at least one.

EDIT: one bug fixed! Now I have to fix the other one and then I can put both fixes in GitHub.

EDIT: another bug fixed, now animations are working! A new branch of the library is available in GitHub.

OpenFlump is being fixed… :slight_smile:

giggle… “OpenFlump.” I love that name. Kinda reminds me of what my cat does all the time. :wink:

(I have a very, ahhh… “relaxed” cat.)

It is genius, not cat
:expressionless:

Sorry guys, I fell into several holes and lost all the time I had to maintain openflump. I’ve been using Flambe/2dkit and Unity mostly (clients like that stuff), but perhaps one day I’ll check out OpenFL again. FWIW, the one project I shipped in OpenFL a couple of years ago has evidently done well.