Jump to content

Why button display false (image)


Recommended Posts

Hello i try making fappy bird demo in tutorial ..

i fisnished and i want fix interface game..but i have problem ..

size game is : 400x 490

i create button play 


var sprite = game.add.button(game.world.centerX, game.world.centerY +20, 'play', menu_state.start,this);

 but it display  not in center (button play.png size 70x70)ScreenShot2014-04-27at232727.png


and when i try in in emulator :




-> all of object display not true, so i want code to more device.. please help me .. i don't have  more experience ..


and finally question : have phaser is good framwork for desktop, not for mobile .. i don't see more game android or ios write by phaser..(and i see some topic , have bug it not run or have bug for android..) 

Link to comment
Share on other sites


Try this. I had the same issues, this worked for me.

var sprite = game.add.button(game.width/2, game.height/2 +20, 'play', menu_state.start,this);sprite.anchor.set(0.5, 0.5);

i tried this.. but it not change !

Link to comment
Share on other sites


  • Recently Browsing   0 members

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