Page 2 of 2

Re: PORTRAIT and Landscape Orientation

Posted: Sun Jul 28, 2013 9:35 pm
by Dixie
maxs..

Attached a stack that will rotate a image when you rotate the device...

Code: Select all

on openStack
   if environment() = "mobile" then
      iphoneSetAllowedOrientations("portrait", "portrait upsidedown","landscape left", "landscape right")
   end if
end openStack

on resizeStack
   if "portrait" is among the words of iphoneDeviceOrientation() then
      set the rect of group "pic" to 0,0,320,480
      set the loc of image 1 of group "pic" to the loc of this card
   end if
   if "landscape" is among the words of iphoneDeviceOrientation() then
      set the rect of group "pic" to 0,0,480,320
      set the loc of image 1 of group "pic" to the loc of this card
   end if
end resizeStack