Jump to content

Full screen issue i =n Phaser


Gul Amjed
 Share

Recommended Posts

i am new to game development using Phaser-2.4.4. currently i am working on a game where i need to set full screen mod in my browser. First i create an game object and then call the full screen method it doesn't work at all.

 

var game = new Phaser.Game(1920, 1080, Phaser.AUTO, '', {preload : preload,create :create, update : update})

 

game.scale.startFullScreen();

 

error is

 

Failed to execute 'requestFullScreen' on 'Element': API can only be initiated by a user gesture.

Phaser.ScaleManager: requestFullscreen failed or device does not support the Fullscreen API

 

please help and let me know what i am missing.

index.html

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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