Window resize/fullScreen

Recommended Posts

Hi in my game i have got it so that when i click on the screen it will toggle full screen and it works perfectly without any problems but when i go and debug my code i get these errors .Any help would be much appreciated 

Uncaught TypeError: Cannot read property 'dispatch' of undefined
    at Phaser.ScaleManager.fullScreenChange (phaser.js:37411)
    at HTMLDocument._fullScreenChange (phaser.js:36175)

WebSocket connection to 'ws://localhost:8125/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
 game.scale.fullScreenScaleMode = Phaser.ScaleManager.SHOW_ALL;
            game.input.onDown.add(gofull, this);
            function gofull() {

        if (game.scale.isFullScreen)
                this.scale.pageAlignHorizontally = true;
                this.scale.pageAlignVertically = true;



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.