git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Detecting window resize complete on AIR native desktop


Creating an AIR desktop app and need to know when the nativeWindow has been resized by the user. This sounds easy:

stage.nativeWindow.addEventListener(NativeWindowBoundsEvent.RESIZE, onResize);

This listener fires the event every 100ms or so while the user drags the window edge. I need to know when the user is finished resizing the window. 

Also, listening for stage.MouseEvent.MOUSE_UP when the user is finished resizing the window does not fire. NativeDragEvent.NATIVE_DRAG_COMPLETE does not fire either. 

Here is trace output:

[trace] 15:02:27:128 onResize() - nativeWindows.width: 911
[trace] 15:02:27:239 onResize() - nativeWindows.width: 884
[trace] 15:02:27:358 onResize() - nativeWindows.width: 866
[trace] 15:02:27:475 onResize() - nativeWindows.width: 844
[trace] 15:02:27:593 onResize() - nativeWindows.width: 820
[trace] 15:02:27:677 onResize() - nativeWindows.width: 805
[trace] 15:02:27:762 onResize() - nativeWindows.width: 799
[trace] 15:02:27:842 onResize() - nativeWindows.width: 788
[trace] 15:02:27:935 onResize() - nativeWindows.width: 778
... 

Thanks for your ideas.

Here's the API docs - I see nothing I can use to reliably solve this issue.
https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/NativeWindow.html <https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/NativeWindow.html>