Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adobe Air: Start native window hidden

How do I open a new window as hidden? (note the visible="false")

<s:Window xmlns:fx="http://ns.adobe.com/mxml/2009" 
      xmlns:s="library://ns.adobe.com/flex/spark" 
      xmlns:mx="library://ns.adobe.com/flex/mx" 
      showStatusBar="false"
      resizable="false" 
      visible="false">

If I declare a window this way, and then call this.open(false);, the window will quickly open and then hide, and then be reshown when I actually display it, which is quite ugly.

I want to do this to be able to load content and fit the window to that size before showing it.

like image 202
forivall Avatar asked Feb 16 '11 19:02

forivall


1 Answers

I was able to set my application invisible (visible=false) in the preinitialize event handler of the application and set it to visible in the handleOnInvoke event handler.

like image 189
tribefan Avatar answered Sep 23 '22 13:09

tribefan