Jump to content

Flash To Phaser tools


Jackie
 Share

Recommended Posts

I create Flash To Phaser tools in github: https://github.com/gamefriends/MiaPhaser
 
It will be easy to create game UI and scene, and export to PNG resource(project/res) and description(project/src/res.js).

  • mia/PhaserExtend.js
    • parse
      • parse preload
      • create scene
      • turn to firstScene by: MIA.gameConfig.firstScene
    • Phaser.Group add:
      • inputEnabled
      • onClick
      • removeClick
      • removeAllClick
  • Game.js

    • //set game configMIA.gameConfig = {    stageWidth:MIA.stageDes.stageWidth,    stageHeight:MIA.stageDes.stageHeight,    bootScene:"Boot",    firstScene:"Scene1"};

    • //add your state config//in flash, top timeline is scene with each frame.MIA.startGame = function () {    var game = new Phaser.Game(MIA.gameConfig.stageWidth, MIA.gameConfig.stageHeight, Phaser.AUTO, 'game');    //----Add Scene    game.state.add('Boot', MIA.Boot);    game.state.add('Scene1', MIA.Scene1);    game.state.add('Scene2', MIA.Scene2);    game.state.add('Scene3', MIA.Scene3);    //fixed logic    MIA.gameConfig.bootScene = "Boot";    MIA.gameConfig.firstScene = "Scene1";    game.state.start(MIA.gameConfig.bootScene);};

The project tree like this:
 project

/flash

/game.fla

/js

/phaser.js

/jsfl

/ExportToJS.jsfl

/res

/a.png

/b.png

...

/src

/mia

/PhaserExtend.js

/Game.js

/res.js

/scene1.js

/scene2.js

...

/index.html
 

 

If you have any suggest, please @miagame_com or leave message, i will do it better. 
 
 
 
/**
* Created with WebStorm.
* User: Jackie Qi / miagame.com
* Date: 2015/9/9
* Time: 11:40
* email: [email protected]
* website: http://miagame.com
* twitter: https://twitter.com/miagame_com
*
* Export Flash To JSON
* vertion: 1.0
*
* project example:
* project
* -flash
* -game.fla
* -js
* -phaser.js
* -jsfl
* -ExportToJS.jsfl
* -res
* -a.png
* -b.png
* -src
* -Game.js
* -res.js
*/

post-16167-0-79672100-1442203126.png

post-16167-0-21611300-1442203133.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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