Copy link to clipboard
Copied
Hi everyone.
I´m trying to simple make an aplication on AIR for desktop with the window on top.
It seems simple as :
debug.text = "start";
stage.nativeWindow.alwaysInFront=true;
stage.nativeWindow.activate();
debug.text = "done";
No errors on compiler, window will not get on top of others , and code after this lines not called....
I´m using Flash Professional CC and AIR 3.4 (Just downloaded this morning...)
Anyone knows what´s not correct !?
Can you help me !?
Yes I published it to a native installer with captive runtime, installed it on my computer and ran it. The window stays on top of other windows.
Here's a video of the final EXE running after it was installed. You can see the windows can't get on top of it:
Copy link to clipboard
Copied
Caveats are found here:
alwaysInFront
property set to in front of fullscreen windows.alwaysInFront
to true
will have no effect when the displayState
property of the window stage is fullScreen
or fullScreenInteractive
.It is generally not advisable to use that feature at all, since it ovevrrides the default behavior of any OS.
Copy link to clipboard
Copied
Actually im doing it on Windows, but then i want to do it in OSX as well.
I´m not changing displayState, neither to fullScreen neither to fullScreenInteractive .
Copy link to clipboard
Copied
Can't hurt to grab the latest AIR 3.9 here:
http://www.adobe.com/devnet/air/air-sdk-download.edu.html
Aside that, what OS?
On Windows that code works exactly as expected. The window will stay on top of everything else that isn't in the same depth stack (any other "always on top" windows may go over it). Otherwise just don't try to go always on top and fullscreen due to the limitations on this.
You don't need to throw an activate() either, unless you're in a situation where you noticed your app was deactivated (unfocused) and you wish to return your app to focus.
Are you making a kiosk?
Copy link to clipboard
Copied
Sinious, i´m doing it on Windows. I don´t need fullscreen .
I trying to do something like a widget thats on top of all windows (not a kiosk)
I´m at the moment updating sdk, i´ll be in touch.
Thanks
Copy link to clipboard
Copied
Sinious, i just updated so now i am targeting air 3.9.0.1380 for Desktop.
I´m getting the same behaviour...
But ... if i go ... and debug it on Air SDK , it works... if i publish.. it doesnt... !
Any idea ?
Thanks
Copy link to clipboard
Copied
Here's the quick example app I used. The password for the cert is just '1234' or use your own temp cert. After published, installed and ran the window stays on top of everything for me.
Example CC Source (code just in frame 1):
Copy link to clipboard
Copied
Very weird...
Your project works... when i copy to mine... mine don´t work..
If i start a new air project and copy it ...it works...
Thank you for your support.
I don´t know what was the issue, but i start a new proj .. and it will work as expected...
That´s a life of a programmer... !
Thanks
Copy link to clipboard
Copied
After a while....
If i publish as a "projector" it doesn´t work....
Also if i publish yours as "projector" it doesn´t work as well... It´s working when i hit F12 and test publish from flash pro... but after publish (even if not projector) it doesn´t stay on top..
Did you test it after publishing ?
Thanks ?
Copy link to clipboard
Copied
Yes I published it to a native installer with captive runtime, installed it on my computer and ran it. The window stays on top of other windows.
Here's a video of the final EXE running after it was installed. You can see the windows can't get on top of it:
Copy link to clipboard
Copied
Thanks, now i got it !
I get it working
Copy link to clipboard
Copied
You're welcome and good luck!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now