Come on, nobody has any idea how to do this?
That was one of my first tries, but because of what my app does (it loads an HTML page which itself contains another Flex application that, once fully rendered, takes a screenshot of itself and sends that data to be processed), it requires that it's actually showing. I just need it to start up either minimized, or behind other windows.
You have a complete event in HTMLLoader class. Can't you just set the window visible property to true once you get his complete event, do the screenshot thing & again set the window visible property to false ? That way it would just be visible for flash of a second. Would that suffice ?
That's really not ideal, as it still interrupts what the user is doing. It'd still be visible while the app takes the screenshot and processes it, so it wouldn't really help much.
There has to be a way to launch my application and have it open behind any active windows...
Would NativeWindow.orderToBack() work for your use case?
No, because "orderToBack" orders the window behind all others in the same application. I need it to send the window behind other windows in the OS.
I am able to open an AIR app in a minimized state by calling callLater(nativeWindow.minimize); in the WindowedApplication creationComplete event handler. The app blinks for a moment in its opened state, and then minimizes. In this case, the nativeWindow object is a property of WindowedApplication, not the stage. I am working this moment on getting the app to open in the background, and then use a SystemTrayIcon command to activate the application. Looks, however, like the NativeApplication.nativeApplication.activate() method is not honored in Windows XP. The app does not activate, and no Event.ACTIVATE event is dispatched. Good hunting.
This works! Thank you!
I have an application who need to be not visible, in the screen, and in the TaskBar. I use this code for my main app:
<?xml version="1.0" encoding="utf-8"?>
private function onAppComplete() :void
this.width = Capabilities.screenResolutionX;
this.height = Capabilities.screenResolutionY;
var w:Window = new Window();
w.showStatusBar = false;
w.showTitleBar = false;
w.systemChrome = "none";
w.transparent = true;
w.type = NativeWindowType.UTILITY;
w.title = "light";
w.x = 0;
w.y = 0;
w.width = this.width
w.height = this.height
w.alwaysInFront = true;
With this app descriptor:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!-- <description></description> -->
<!-- <copyright></copyright> -->
<!-- <publisherID></publisherID> -->
<content>[This value will be overwritten by Flex Builder in the output app.xml]</content>
Tell me if it help you