Jump to content

Flash to Phaser JSFL Script


Recommended Posts

Hi all,

 

"Flash to Phaser is a JSFL script that will aid in the process of laying out scenes within the Flash IDE and converting them into Phaser JavaScript files. It works by parsing the Stage for any Bitmap or Symbol objects and then automatically builds-up a JavaScript source file including preload and create functions that accurately re-create what is seen inside the Flash IDE.

 

If the script encounters a Symbol it treats it as a Phaser Group and uses the Symbol name as a Group name. Any Bitmaps within the Symbol are treated as Group children and positioned accordingly.

 

Objects have their x, y, rotation and scale properties re-created in the JavaScript."

 

http://www.photonstorm.com/phaser/flash-to-phaser-jsfl-script

Link to post
Share on other sites

If it only did the preload code, It still gonna make me happy.

 

And maybe a important point is the support and: It only supports Bitmaps and Symbols.

 

so questions about: "I drawed a cute character but it doesn't show/export" will be skipped. :)

Link to post
Share on other sites

Regarding the cute vector character. Maybe you could use 'document.convertSelectionToBitmap' to convert vectors into bitmaps? I just googled that method name because I used this function lately in Flash CC by context menu to create some bitmaps from textfields. Would be good for mocking purposes- maybe not that good for the final game from the view of the filesize.

 

Anyway, very nice idea to use jsfl to create the phaser states!

Regards George

Link to post
Share on other sites

I did consider that, and something similar for Text fields, but ultimately decided against it. I think because I couldn't figure out how to give the generated bitmap a file name in order to get the preload section correct.

 

I figured it's open source, easy to edit, so other devs can get busy with it :) It is also probably worth extending to support multiple layers too, but it doesn't right now.

Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...