Trying to think how to get stick figures in html5, I notice Flash has a spritesheet export. Anyone tried to get that working for Phaser though?
Looking at JSON-Array, seems like a standard format. Never noticed that before.
There is a tool created by the CreateJS people called Zoe that supposedly exports Flash animations to HTML5 spritesheets. It says it is for CreateJS, but I believe CreateJS uses pretty standard spritesheets. Maybe check it out and see what it does and if it could be a good option.
Seems to crash with the swf I’m working on now. Might be some encryption, I lost the orignal source, so been using jpexs. Might come in handy for some other projects though. Thanks for sharing.
Hmm…sorry to hear it isn’t working for you in this case. I played around a bit with Flash quite some years ago but it is definitely not something I am extremely knowledgeable about.
Hope it is at least useful in the future!
I use the flash sprite exporter, without any issues in my current project. I select JSON option, and then in phaser in scene preload function load it like this :
this.load.atlas('ui', './img/ui.png', './img/ui.json');
and then inside create function like this :
this.add.sprite(this.gameCenterX, 567, 'ui, "trayBG0000");
you just have to name the instances of the exported sprite in Flash how do you want the name to be, just notice that flash will add “0000” to them, but you can see that clearly in generated JSON file.
Phaser 3 has significantly made using sprite sheets easier. Not familiar with using Flash much anymore, but here are some great programs to use for packing your sprite sheet and editing your Phaser 2 or 3 projects in an IDE:
Yeah, I finished the exporting in no time. I think the importing won’t be too difficult. Too bad there is no automated way. Unity was talking about someway to use swf file, not sure on that. Could never find out how to use it. Anyway, if swf to Phaser can bring $1k over next 10 years again. Worth it to convert old games.
If this is something you are going to be doing over and over (like if you have a business converting Flash games to HTML5 or you have a pile of your own games you are converting) it may be worth it to try to develop your own tools to automate your workflow or at least the very repetitive parts. While I have never worked with it before, I do know that the Adobe programs have a pretty feature-rich plugin and extension system that allows you to do all kinds of things with, you guessed it, Javascript. And then you could again use Javascript with node to do other things within the filesystem. And even if that is too limiting, I believe Zoe was written in AIR, which then bridges you into the filesystem for saving various file types such as PNGs.
While it may not be worth the time it is something to consider.