07-01-2011 10:11 AM
Hello everyone. I setup the accelerometer in my app, setup the listeners, created a 'portrait' state. what's the call to change state in my _accelerometer.onUpdate()?
Solved! Go to Solution.
07-01-2011 10:41 AM
If you're just trying to have your app support the landscape and portrait orientations, I wouldn't bother using the accelerometer.
Either listen for the StageOrientationEvent.ORIENTATION_CHANGE event, or as I am in my current app just monitor Event.RESIZE and don't worry about "landscape" versus "portrait" but instead just respond to the actual width and height values.
I know the Tablet OS developer guide stuff shows an example using the accelerometer, but I have to say it mystifies me why they'd bother suggesting that approach.
07-01-2011 10:47 AM
I didn't even read about the accelerometer approach, I just assumed, but you know what they say about people that assume
Your approach sounds much better. I created 2 states, onefor landscape one for portrait already, so in the StageOrientationEvent function can I switch states? If so, how?
07-01-2011 01:32 PM
Got it.