Can I prevent that annoying black box from rotating on my screen during rotation events?
Hi @pbligh,
You can’t control (eliminate) the box itself, but you can use orientation listeners to “sync” the screen rotation with the box, at least to a decent degree of accuracy. Although, this probably isn’t the answer you wanted to hear, sorry.
Brent
Hi Brent, Hi pbligh,
I have the same problem as you, pbligh.
Brent could you give us a sample code to illustrate your explanation above?
I’m not sure to understand how to do when you say _"_you can use orientation listeners to “sync” the screen rotation with the box, at least to a decent degree of accuracy."
Thank you very much
Olivier
Hi @pbligh,
You can’t control (eliminate) the box itself, but you can use orientation listeners to “sync” the screen rotation with the box, at least to a decent degree of accuracy. Although, this probably isn’t the answer you wanted to hear, sorry.
Brent
Hi Brent, Hi pbligh,
I have the same problem as you, pbligh.
Brent could you give us a sample code to illustrate your explanation above?
I’m not sure to understand how to do when you say _"_you can use orientation listeners to “sync” the screen rotation with the box, at least to a decent degree of accuracy."
Thank you very much
Olivier
local function onOrientationChange (e)
local newAngle = display.currentStage.rotation - e.delta
transition.to( display.currentStage, {time= 500, rotation = newAngle})
end
Runtime:addEventListener( “orientation”, onOrientationChange )
Hi
I tried jstrahan’s solution above
Sorry but I have not managed to do what I wanted…
Rotation seems to stop randomly…and my screen is shifted.
How could I be sure that my screen will be on a landscapeRight or LandscapeLeft position after rotation?
Did I miss something?
Thanks
Olivier
local function onOrientationChange (e)
local newAngle = display.currentStage.rotation - e.delta
transition.to( display.currentStage, {time= 500, rotation = newAngle})
end
Runtime:addEventListener( “orientation”, onOrientationChange )
Hi
I tried jstrahan’s solution above
Sorry but I have not managed to do what I wanted…
Rotation seems to stop randomly…and my screen is shifted.
How could I be sure that my screen will be on a landscapeRight or LandscapeLeft position after rotation?
Did I miss something?
Thanks
Olivier