ceb Posted February 18, 2014 Share Posted February 18, 2014 Hello im a noob so dont hate please. I have created a button in a game and set it to appear when need but i can't see to find anywhere online that can tell me how to make to button link to twitter or whatever? Can phaser do this? Thanks Ceb123a Link to comment Share on other sites More sharing options...
Alvin Posted February 18, 2014 Share Posted February 18, 2014 Hello, Phaser (or any other HTML5 game framework) can only do things inside a <canvas> so you have two options :- Create a regular <a href="Whatever.com">link</a> and move it on top of your canvas.- If you want to stick with a Phaser Button, you just need use it to mimic a link's behaviour, like :function onClick(){ window.open("www.phaser.io", "_blank");} Link to comment Share on other sites More sharing options...
ceb Posted February 19, 2014 Author Share Posted February 19, 2014 Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts