Skip to content

how to make haxeflixel read data files from a spritesheet made by adobe #2375

Answered by RichardBray
wormylmao asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, @wormylmao are you the same person who commented in this video?
https://www.youtube.com/watch?v=7jUKDSL2L6E&lc=Ugw-rEIy2k5bU4S8MyB4AaABAg

If you are, great to see you on the forums. If it's not you, please ignore my previous comment.

I haven't used Adobe before but my understanding is that if you use the fromSparrow method in FlxAtlasFrames it should work.
https://api.haxeflixel.com/flixel/graphics/frames/FlxAtlasFrames.html#fromSparrow.

So something like this:

        // Helpers.hx
	public static function loadFrames(path: String): FlxFramesCollection {
		return FlxAtlasFrames.fromSparrow(
			'assets/images/$path.png',
			'assets/images/$path.json' // this could also be .XML file too

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@wormylmao
Comment options

@RichardBray
Comment options

Answer selected by wormylmao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants