Page 1 of 1

Auto rotation

Posted: Mon Dec 23, 2013 11:29 am
by MaxV
How to set up auto rotation?
I tried on my stack:

Code: Select all

on orientationChanged   
  set the fullscreenmode of this stack to "exactFit"  
end orientationChanged
but is doesn't work... :(

Re: Auto rotation

Posted: Mon Dec 23, 2013 2:56 pm
by williamdesmet
Hi MaxV,
You can use mobileSetAllowedOrientations.

Code: Select all

 if the environment is "mobile" then
      mobileSetAllowedOrientations "landscape left,landscape right"
end if

Re: Auto rotation

Posted: Mon Dec 23, 2013 3:24 pm
by MaxV
Thank you!!! :D
I added:

Code: Select all

if the environment is "mobile" then
      mobileSetAllowedOrientations    "portrait,portrait upside down,landscape left,landscape right"
end if
And works great!