on preOpenStack
set the visible of this stack to true
set the acceleratedRendering of this stack to true
--set resolution independence mode
set the fullscreenmode of this stack to "letterbox"
--set allowed orientations
mobileSetAllowedOrientations "portrait,portrait upside down,landscape left,landscape right"
if the platform is iphone then
iphoneSetRedrawInterval
iphoneUseDeviceResolution true, true
end if
--set stack size
if the environment is mobile then
if gORTN = "portrait" then
set the rect of this stack to 0,0,768,1024
else
set the rect of this stack to 0,0,1024,768
end if
end if
end preOpenStack