Marzullo Posted August 15, 2016 Share Posted August 15, 2016 Hello? What is the best way to export sprites from Flash and load them into pixi.js? I refer to this tutorial: https://helpx.adobe.com/animate/how-to/export-animation-sprite-sheet.html Quote Link to comment Share on other sites More sharing options...
Marzullo Posted August 15, 2016 Author Share Posted August 15, 2016 pixi.js data format is not there, i wonder if there was any workaround or I should choose another approach. I've tons of sprites to export from flash. Quote Link to comment Share on other sites More sharing options...
dmko Posted August 16, 2016 Share Posted August 16, 2016 JSON (not json-array) works out of the box, and you can reference the frames directly by id name Note though that Flash appends a bunch of "0000"s to the names. So if your movie clip is "ball" in the json it'll be "ball0000". Personally I just delete that 0000 from the json Quote Link to comment Share on other sites More sharing options...
dmko Posted August 16, 2016 Share Posted August 16, 2016 By the way - if you're like me, coming to PIXI from flash and trying to port some stuff over - this workflow is fantastic. Animate CC still allows some actionscript on the timeline, so you can write a few snippets to export configuration data to pass to pixi (x,y,width,height for the *sprites*). That's a game-logic kind of thing (configuration json, not texture atlas json), but I found it to be super awesome that I could use Flash as like a design stage, and then export a texture atlas and configuration data which PIXI uses to lay stuff out - and it matches 1:1 Quote Link to comment Share on other sites More sharing options...
Marzullo Posted August 16, 2016 Author Share Posted August 16, 2016 Yes yes, that's exactly where I was getting to. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.