Hi again,
I’m not sure what is causing your issues, but I tested with the following code and I could never get the scene to rotate “wrong” on my iPhone 5. I also set the config to merely “landscapeLeft” is the “default” table in build.settings, and I omitted the “supported” table as you originally did too.
[lua]
local composer = require( “composer” )
local scene = composer.newScene()
composer.removeHidden()
local widget = require(“widget”)
leftEdge,rightEdge,topEdge,bottomEdge,screenHeight,screenWidth=display.screenOriginX, display.contentWidth-display.screenOriginX, display.screenOriginY,display.contentHeight -display.screenOriginY,display.contentHeight-display.screenOriginY*2,display.contentWidth–display.screenOriginX*2
local currentOrientation = “landscapeLeft”
local function onOrientationChange( event )
currentOrientation = event.type
--titleText.text=system.orientation
if (currentOrientation==“portraitUpsideDown”) then
local rot=-1
topGroup.x=0
topGroup.y=screenHeight
topGroup.xScale=screenHeight/screenWidth
topGroup.yScale=screenHeight/screenWidth
topGroup.rotation=rot*90
chartGroup.x,chartGroup.y=450,650
chartGroup.rotation=rot*90
displayGroup.rotation=0
displayGroup.x,displayGroup.y=0,0
elseif (currentOrientation==“portrait”) then
local rot=-1
topGroup.x=0
topGroup.y=screenHeight
topGroup.xScale=screenHeight/screenWidth
topGroup.yScale=screenHeight/screenWidth
topGroup.rotation=rot*90
chartGroup.x,chartGroup.y=450,650
chartGroup.rotation=rot*90
displayGroup.rotation=180
displayGroup.x=screenWidth
displayGroup.y=screenHeight
elseif (currentOrientation==“landscapeRight”) then
topGroup.x,topGroup.y=0,0
topGroup.xScale=1
topGroup.yScale=1
topGroup.rotation=0
chartGroup.rotation=0
chartGroup.x,chartGroup.y=310,154
displayGroup.rotation=180
displayGroup.x,displayGroup.y=0,0
displayGroup.x=screenWidth
displayGroup.y=screenHeight
elseif (currentOrientation==“landscapeLeft”) then
topGroup.x,topGroup.y=0,0
topGroup.xScale=1
topGroup.yScale=1
topGroup.rotation=0
chartGroup.rotation=0
chartGroup.x,chartGroup.y=310,154
displayGroup.rotation=0
displayGroup.x,displayGroup.y=0,0
end
print (currentOrientation,displayGroup.rotation,displayGroup.x,displayGroup.y)
end
function scene:create( event )
screenGroup = self.view
topGroup=display.newGroup()
topmenu = display.newImageRect(“topmenu.png”,1024,105)
topmenu.anchorX = 0
topmenu.anchorY = 0
topmenu.x=0
topmenu.y=0
topmenu.touch = menuListener
topmenu:addEventListener( “touch”, topmenu )
topGroup:insert(topmenu)
chartGroup=display.newGroup()
chart = display.newImage(“marina.gif”)
chart.anchorX = 0
chart.anchorY = 0
chart.x=0
chart.y=0
chartGroup.x=310
chartGroup.y=154
chartGroup:insert(chart)
displayGroup=display.newGroup()
displayGroup:insert(topGroup)
displayGroup:insert(chartGroup)
screenGroup:insert(displayGroup)
Runtime:addEventListener( “orientation”, onOrientationChange )
end
function scene:destroy( event )
local sceneGroup = self.view
display.remove(sceneGroup)
end
– END OF IMPLEMENTATION
– “createScene” event is dispatched if scene’s view does not exist
scene:addEventListener( “create”, scene )
scene:addEventListener( “destroy”, scene )
return scene
[/lua]