State:
Mainstack
- StartCard
iPadStack
iPhoneStack
iPhoneRetStack
The following procedure worked very well in iOS 4 and 5 - but not in 6.x
Mainstack script
Code: Select all
on getTheDevice
put the machine into tDevice
switch tDevice
case "iPhone Simulator"
case "iPhone"
case "iPod Touch"
if iphoneDeviceScale() is 2 then
go to stack "iPhoneStack"
else
go to stack "iPhoneStack320"
end if
break
case "iPad Simulator"
case "iPad"
go to stack "iPadStack"
break
end switch
end getTheDevice
Code: Select all
on preOpenStack
set the visible of this stack to false -- hide it
end preOpenStack
on openstack
getTheDevice -- your substack opens here; it is visible
end openstack
--Substacks with cards--
iPadRetStack
iPadStack
iPhoneStack
iPhoneRetStack
iPhoneRet4Stack
Mainstack script
Code: Select all
on getTheDevice
put the machine into tDevice
switch tDevice
case "iPod Touch"
switch
case (the screenLoc is "160,240") or (the screenLoc is "240,160")
go stack "iPhoneStack320"
break
case (the screenLoc is "320,480") or (the screenLoc is "480,320")
go stack "iPhoneStack"
break
case (the screenLoc is "320,568") or (the screenLoc is "568,320")
go stack "iPhoneRet4Stack"
break
end switch
break
case "iPhone"
switch
case (the screenLoc is "160,240") or (the screenLoc is "240,160")
go stack "iPhoneStack320"
break
case (the screenLoc is "320,480") or (the screenLoc is "480,320")
go stack "iPhoneStack"
break
case (the screenLoc is "640,960") or (the screenLoc is "568,320")
go stack "iPhoneRet4Stack"
break
end switch
break
case "iPhone Simulator"
switch
case (the screenLoc is "160,240") or (the screenLoc is "240,160")
go stack "iPhoneStack320"
break
case (the screenLoc is "320,480") or (the screenLoc is "480,320")
go stack "iPhoneStack"
break
case (the screenLoc is "568,320") or (the screenLoc is "320,568")
go stack "iPhoneRet4Stack"
break
end switch
break
case "iPad"
switch
case (the screenLoc is "384,512") or (the screenLoc is "512,384")
go stack "iPadStack"
break
case (the screenLoc is "768,1024") or (the screenLoc is "1024,768")
go stack "iPadRetStack"
break
end switch
break
case "iPad Simulator"
switch
case (the screenLoc is "384,512") or (the screenLoc is "512,384")
go stack "iPadStack" --iPad 1, iPad 2 or iPad Mini"
break
case (the screenLoc is "768,1024") or (the screenLoc is "1024,768")
go stack "iPadRetStack"
break
end switch
break
end switch
end getTheDevice
After splashscreen the screen is black.
Thanks in advance ... Guera