Jump to content

Display Createjs animation inside a Phaser games ?


bali33
 Share

Recommended Posts

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

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...