I’m trying to integrate a GIF into HaxeFlixel, to get around the issue of maximum texture sizes (eg. 1024x768) for large animations (not video). You can read about it in this HaxeFlixel issue.
I’m looking at using the haxe-gif library for this. From his instructions:
class Main extends Sprite {
public function new () {
super ();
var bytes:Bytes = Bytes.ofString(Assets.getText("images/anim1.gif"));
var gif1=new AnimatedGif(bytes);
this.addChild(gif1);
Assets.getText
and Assets.getBytes
are returning null for the gif; even when I have explicitly included *.gif
in the assets
tag. Oddly, I can access assets/images/test.txt
, so I know I’m using paths correctly.
Am I missing something?