Is there a way to differentiate between the
WindowedApplication windowResize event and the
applicationDeactivate event (which, from what I can tell only gets
fired when you minimize or hide the window)? For example, I have a
function that fires when the window gets resized (windowResize
event) that adjusts the components on the screen to maintain aspect
ratio. This all works great, except the function also gets fired
when you minimize the window causing some problems in my function.
So I need something that will help with this – like telling
the app. not to fire the windowResize event when you minimize.
|||
Ok, I figured out a way around this using the calllater
method:
When the function was fired I decided to get the height of
the window to tell me if the application was minimized or not -
well that’s great, except the function was getting fired before the
window actually got minimized all the way, so that didn’t work
until I used callLater which allowed the window to complete
minimizing so I could get the height after it was minimized. After
that it was as simple as if this.height != 0 call resize function.
<mx:WindowedApplication windowResize=”removeResize(event)”
/>
private function removeResize(event:Event):void {
callLater(remove2);
}
private function remove2():void {
if (this.height != 0) {
resizeMap();
}
}
Related posts:
- LR 3.5 opens maximized window w/o ability to resize
- Windows/minimize/Maximize
- Minimize issue
- How to minimize/maximize a flash application
- titleIcon in AIR Window and WindowedApplication
Related posts brought to you by Yet Another Related Posts Plugin.