airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
202 stars 11 forks source link

Center app on launch #1303

Open chazhenry opened 2 years ago

chazhenry commented 2 years ago

Using Windows AS3 Harmon 633, but this issue has been constant through all libs. When I launch my app, it is tragically off screen - meaning that in a multi-monitor setup, it picks the smallest monitor, is shifted down and right and hangs about a third off screen. Is there a way to have it find the largest monitor and center itself?

MalacTheLittle commented 2 years ago

App is positioned on screen that is set as "Main display" in "Display settings" as all other apps. If you want to center it on screen you should add at the begining of your code:

stage.nativeWindow.width = Capabilities.screenResolutionX*0.5;
stage.nativeWindow.height = Capabilities.screenResolutionY*0.5;