« XMPP for real time flash communication | Home | Calculate aspect ratio based on width and height »

September 1, 2008

Air bug? minHeight/minWidth

I have experienced something that could be a bug (feature?).

For example, if you set a window's x position to 100 differs if you have specified a minWidth. Somehow i think the registration point changes.

This method corrects the bad positioning of the window:

import flash.display.Screen; import mx.core.Window; public function fixPositioning(win:Window):void{ win.nativeWindow.x += (win.nativeWindow.x * 1.5) + (Screen.mainScreen.visibleBounds.width * 0.5); }

It's the same for the y positioning.

Any explanation as of why this happens is greatly appreciated :)

BTW, it happens with NativeWindow instances not only with Window's.

--fernando

About this Entry

This page contains a single entry by fernando published on September 1, 2008 11:50 PM.

XMPP for real time flash communication was the previous entry in this blog.

Calculate aspect ratio based on width and height is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.