Results 1 to 8 of 8
  1.    #1  
    Hey Guys,

    In my new app Gray's Anatomy I have an intro scene, a results list scene, and the actual information view scene. I only want the information view scene to have orientation("free").

    In order to do this, I set up the if statement in the activate function:

    Code:
    if (this.controller.stageController.setWindowOrientation) {
     this.controller.stageController.setWindowOrientation("free");
    }
    And then my cleanup function has:

    Code:
    this.controller.stageController.setWindowOrientation("up");
    Now, this works perfectly fine. When I launch the app, navigate to the scene with the orientation("free") if statement, I can turn the page anyway I chose, when I back out, the results page is perfectly straight and unable to be turned.

    However, when I then launch the scene with the orientation if statement again, it is unable to be turned. It's as if the cleanup function supercedes the if statement in the activate function. Is this true?

    I tried removing the if statement and just leaving this:

    Code:
    this.controller.stageController.setWindowOrientation("free");
    However, this does not work.

    Any Suggestions?
  2. #2  
    have you put it in the .activate function? .setup is run one, while activate is ran each time the scene is pushed to the front of the stack.
  3.    #3  
    Yeah, I put the if statement in the activate function... : /

    I actually tried putting it in both first, but that didn't work either. haha.

    It's in activate for now.
  4. #4  
    Just a shot in the dark here, but take out the code for this in the cleanup, and put it in the previous scenes activate. See if that helps.
  5. Tibfib's Avatar
    Posts
    345 Posts
    Global Posts
    347 Global Posts
    #5  
    Quote Originally Posted by spdsktr View Post
    Just a shot in the dark here, but take out the code for this in the cleanup, and put it in the previous scenes activate. See if that helps.
    Yeah I think the problem is the cleanup.
  6.    #6  
    I actually found out the cleanup function idea from one of the sample apps provided with the SDK. I saw them doing it and figured that was the smart way to do it. It seems to work there... : /

    Well, in a day or two I'll try it out and post back.

    Thanks for the suggestions.

    Let's see if it works.
  7.    #7  
    Hey guys,

    that's no luck!

    I can't make ONE scene have "free" orientation, and the rest of my app have fixed (up). If at any point in the app, I set the orientation as up, it doesn't matter what I set the rest of the app to, it always stays fixed.

    Any Suggestions?
  8. #8  
    Instead of doing the "up" orientation change in the cleanup routine, I think you should try it in the deactivate routine. And leave the "free" orientation change in the "activate" routine.

Posting Permissions