views:

151

answers:

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.

A: 

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