If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Contributor
braden
Posts: 23
Registered: ‎12-08-2010
My Device: Pearl 9100/Playbook (sim)

How can i do auto orientation in my app?

Hi,

 

I have a tic tac toe app that i want to have work in both orientations but, sometimes when i switch it to portrait mode in the simulator it doesnt always readjust. But, sometimes it does. is this a bug in the simulator?

 

Note: I have autoOrients tag set to true and I'm using 0.9.3 of the simulator.

 

Any ideas?

 

Thanks!

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How can i do auto orientation in my app?

You'd have to give us more to go on than that... "doesn't always readjust"... like, how?

 

There is a bug in the simulator that means after rotating, you have to do a "bottom-swipe" (that's up from the bottom bezel) to bring up the Home Screen (even if it looks like the app is already minimized) and then tap on your app to restore it to fullscreen.

 

This and everything else currently known about this can be discovered by searching the forum for past posts.

 

If you know all that and have read some search results, and it's not helping, give more info about the nature of your problem and how your app is attempting to handle the reorientation.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Contributor
braden
Posts: 23
Registered: ‎12-08-2010
My Device: Pearl 9100/Playbook (sim)

Re: How can i do auto orientation in my app?

sorry, to clarify when I rotate the simulator while the app is maximized it orients properly but when it is minimized it doesn't and is squished/distorted. Im guessing this is a sim issue but, what do you think?

 

Thanks!

Please use plain text.
Contributor
Reveller
Posts: 10
Registered: ‎01-19-2011
My Device: Playbook simulator

Re: How can i do auto orientation in my app?

[ Edited ]

Same thing happening here, but it is all the time, not just sometimes. I created a Container and set:

 

stage.scaleMode = StageScaleMode.NO_SCALE;

 

Then I added a movieclip to the stage. After minimizing the app then rotating to protrait mode from the bottom right corner, the movieclip is squished (scaled).

 

I have seen a video posted by Renaun Erickson using simulator 9.2 where he rotates, but it doesn't look like the button is scaled. Others have said it is still not supported, so I am trying to find a clear answer.

 

Thanks.

 

Note: I am using 9.3 SDK and simulator on Windows 7 32-bit.

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How can i do auto orientation in my app?

This is another bug in the simulator.  Minimized apps don't get notified and cannot, when reactivated, discover the new orientation.  Wait for an updated SDK if you want to test that.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.