1

Just a couple of quick questions...not too hard to answer hopefully!

How do I set the allowed orientation from scene to scene?

I can set it for the entire stage with:

this.controller.setWindowOrientation("free");

but I want to be able to set it for each scene, some of which I don't want any rotation...

Any ideas?

Also, is there any way to restrict the orientation to just up and down (portrait and reverse portrait) and not have a rotation on landscape?

Many thanks

TheBounder.

jamesdlin
  • 81,374
  • 13
  • 159
  • 204
Oliver
  • 809
  • 1
  • 11
  • 18

1 Answers1

3

1)use the following code in scenes which one you want to set orientation

if (this.controller.stageController.setWindowOrientation) { this.controller.stageController.setWindowOrientation("free"); }

2) for your second question set the orientation left and right only it will work

Aswan
  • 5,085
  • 10
  • 46
  • 70