Jump to content

Force portrait orientation


vince
 Share

Recommended Posts

Hi all, I've just started using Phaser and think it is a great framework!

 

I'm in the process of developing a game with it now, and can't seem to be able to force users into the Portrait orientation (or any orientation). A search on the forums led my to this line of code:

 

game.stage.enableOrientationCheck(false, true, 'orientation');

 

but when I added this in my function create(), I get the following error:

 

Uncaught TypeError: Object #<Object> has no method 'enableOrientationCheck'

 

Not sure what am I doing wrong, would greatly appreciate if anyone could help out! Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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