Keep web app from turning when phone turns

0 favourites
  • 5 posts
From the Asset Store
Create your quiz game! Create unlimited categories. Manage categories and questions
  • Im looking for a way to lock the web page from turnining when the phone turns sideways. I'm assuming that I need to edit the index.html file. I published my game in scale mode and it is actually is sized 640x480 and views fine on any phone I've tested on. Basically I want it locked in position. I don't want it resizing on double touches either, which it does on some phones even if the "screen rotation" is turned off. Is there something more I can do in Construct2? Or is it a matter of editing the index.html file?

    Any help is appreciated.

    Also: you can view it here at

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • html on these devices have no way to lock the screen. It's not possible at this time. It sucks, but that's the way of it. I discovered this when writing my own webapp in code. So C2 won't give you a solution to this.

    However, that doesn't mean you might not be able to adjust. I haven't tried this in C2, but this is what you can try to do.

    on device orientation change to portrait

    rotate your the game layouts so that it's now back to portrait. however this has the catch that players will still see the rotation and the pop back when you change your layout angle.

    alternativly which is what I did

    on device orientation change to portrait

    put up a different screen and pause the app. Then inform the player that please rotate back to landscape.

    However, cacoonjs and appmobi may provide locking options. As I haven't done this bridging as of yet I have no idea if it's possible. but I think it would be.

  • Jayderyu is right, appmobi and CocoonJS can both do this. I recommend Cocoon though as appMobi has some game-breaking bugs you are likely to run into.

  • Unfortunately there are no mobile browsers that support orientation lock at all yet - it's just a quirk of HTML5 right now, but it is being fixed (I think an orientation lock standard is being worked on). Workarounds are either just to use letterbox scale, so it just scales and shows black bars down the sides when you rotate, or pause the game and ask to set the orientation back if it's turned the wrong way.

  • Thanks for the responses everyone. Much appreciated!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)