Jackie Posted September 14, 2015 Share Posted September 14, 2015 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.jsparseparse preloadcreate sceneturn to firstScene by: MIA.gameConfig.firstScenePhaser.Group add:inputEnabledonClickremoveClickremoveAllClickGame.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*/ Link to comment Share on other sites More sharing options...
Recommended Posts