I have an application with more than 1 state, for some reason I need that in the “Start” state the windows has no chrome, otherwise in the second state it should have it..
I set in app.xml <systemChrome>none</systemChrome>
and than in AS3
currentState = 'State2';
var windowOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
windowOptions.systemChrome = NativeWindowSystemChrome.STANDARD;
windowOptions.type = NativeWindowType.NORMAL;
But the chrome is still not visible/present
You cannot change once a window is open.
I presume you are making a type of “Preloader” picture?
What may be easier is to use 3 in total. Main which would be totally invisible which loads up your “State 1” Window with what it needs. and when its time to change to state 2, it could open up another window with the “State 2” settings and place what needs in there.
If it is not a Preloader, what you could do is still the same again, but move all the display objects from your _state1.stage to _state2.stage.
I know its not really the answer you are looking for, but hopefully the solution will help.
EDIT
OR, if it is just a simple preloader. Load everything in Main as you always have, but set it to be invisible, but have it Open up a new Native Window which IS visible, and then when the app is ready, just close and bin the preloader window. (I am not sure that would be nicer to read code wise, but it would be far simpler)