Skip to main content
March 25, 2011
Question

Orientation Change Detection Xoom and Flex Hero

  • March 25, 2011
  • 3 replies
  • 1827 views

Hello:

I am stuck, I can't seem to get my Xoom to report a screen orientation change with the app I'm developing with Flash Builder Burrito.

I have an extended view with the following code in the constructor:

this.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, change);

And then change function looks like this:

protected function change(event:StageOrientationEvent):void {

     trace("change");

}

I'm not seeing this in the console when the screen rotates. I've seen many examples which use a "stage" object to listen to the event. I have tried to obtain this from the top most MXML file and still have not had any luck.

Why is this event not tiggering?

This topic has been closed for replies.

3 replies

Participant
June 15, 2012

I know this is old, but I just found a solution in my case, and figured i'd share.

Instead of listening for "stageOrientationEvent.ORIENTATION_CHANGE", listen for "Event.RESIZE".

Worked like freakin' pixie dust for me.

Hope this helps someone!

Participating Frequently
April 18, 2011

There are two things to do.

1) Check your application descriptor. You may have set your application to not reorient.

<autoOrients>false</autoOrients>

2) You probably should also watch for the Resize event. This is also a great event to listen to for orientation changes.

Pahup
Adobe Employee
Adobe Employee
April 5, 2011

Hi,

Is your stage rotating when you rotate the device?

Have you tried following.

this.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, change);

-Thanks

Pahup