bali33 Posted July 28, 2016 Share Posted July 28, 2016 Hi guys, I need to play Flash animations exported as CreateJS animations from Adobe Flash/Animate inside my phaser game. Is that possible ? It would mean that CreateJS should initialise itself using the Phaser canvas and then be able to write inside it. Thanks Link to comment Share on other sites More sharing options...
rich Posted July 28, 2016 Share Posted July 28, 2016 Yes it's possible, but it takes some serious effort. I built a huge app for the BBC that loaded in massive amounts of CreateJS animations, and played them back in a Phaser game, with Phaser handling UI, audio, etc. In the end I had to hijack a whole bunch of CreateJS functions, and it was a bit of a mess, but it works. Probably easiest is to let CreateJS use its own canvas, but hide it from view, and then just copy from it to the Phaser canvas every frame, as needed. You could map CreateJS to write to a BitmapData, and then use that to texture a Sprite. That will work fine. Just don't under-estimate the strain it will put on the browser if used under stress. Link to comment Share on other sites More sharing options...
bali33 Posted July 29, 2016 Author Share Posted July 29, 2016 Thanks for the answer ! I hope someday Adobe will write a Phaser export - CreateJS is great but there is no reason that other wide used JS frameworks don't have their own export. Link to comment Share on other sites More sharing options...
Recommended Posts