Home

Awesome

MiaPhaser

#Flash To Phaser

Create project like this:

##First:

project
 /flash
     /game.fla
 /js
     /phaser.js
 /jsfl
     /ExportToJS.jsfl
 /res
     /a.png
     /b.png
 /src
     /mia/PhaserExtend.js
     /Game.js
     /res.js

##Second:

Edit game config

//the defalut stage size as same as Fla publish size
//set the boot scene and firstScene
MIA.gameConfig = {
    stageWidth:MIA.stageDes.stageWidth,
    stageHeight:MIA.stageDes.stageHeight,
    bootScene:"Boot",
    firstScene:"Scene1"
};
//set the scene
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);
};

##Last

#If you have any suggest, please @miagame_com , I will do it better.