I want that some images change the angle when a rotate the iphone, but with this code i don’t have the best result every time.
Some times the images change to the orientation of the iPhone, but some times they don’t rotate at all.
i send a file with the example, because i want the background image to stay on the same spot, and only the images of the buttons to change angle.
Does some else had this problem?
Code: Select all
on orientationChanged
put mobileDeviceOrientation () into theOrientation
if theOrientation = "portrait" then
set the angle of image "butao_home_low.png" of card "game_stuff" to 90
else if theOrientation = "portrait upside down" then
set the angle of image "butao_home_low.png" of card "game_stuff" to 270
else if theOrientation = "landscape left" then
set the angle of image "butao_home_low.png" of card "game_stuff" to 180
else if theOrientation = "landscape right" then
set the angle of image "butao_home_low.png" of card "game_stuff" to 0
end if
end orientationChanged