The following small prefab is a modified Phaser.Text Object. It enables the input, changes the mouse cursor and will open a provided link in a new window, if the text will be clicked. Popup-blocker seem to block this, because the new window is no direct result of the “click”.

class Link extends Phaser.Text {
    constructor(game, x, y, text, url, style) {
        super(game, x, y, text, style);
        this.url = url;
        this._oldFill = null;

        //add custom objects to the game
        this.game.add.existing(this);
        //Activate inpute events
        this.inputEnabled = true;
        //Change hover cursor
        this.input.useHandCursor = true;
        //Listen to the events
        this.events.onInputOver.add(this.onOver,this);
        this.events.onInputOut.add(this.onOut, this);
        this.events.onInputDown.add(this.onClick, this);
    }

    onOver() {
        this._oldFill = this.fill;
        this.fill = "blue";
    }

    onOut() {
        this.fill = this._oldFill;
    }

    onClick() {
        window.open(this.url, "_blank");
    }
}

Easy to use:

let someLink = new Link(this.game, 0, 0, "Link text", "http://example.com", {});

 

 
 
Coptergame is a game I liked very much during school. So I made a HTML5 remake of  this game. This game is my second game with Phaser.js.
 
The player controls a helicopter, that is pulled down with gravity and upwards with the space bar or a mouse click. The quest is to fly through a randomly generated endless level and to avoid touching any block.