Results 1 to 3 of 3
  1.    #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.
  2. #2  
    Mojo looks in your scene assistant for a function named 'orientationChanged'. If it exists, every time the device's orientation changes, it'll pass it an orientation parameter as a string: up, down, left, or right.

    In that function, you can do something like this:

    if (orientation=='up'||orientation=='down') {
    this.controller.stageController.setWindowOrientation(orientation);
    }


    If you do this, don't set the window orientation to 'free'.

    I don't think this approach is officially documented, but it's used by Palm's own apps.
  3.    #3  
    Nice!

    Cheers.

Posting Permissions