简体   繁体   中英

How to set Flash Player window location in Flash project as3?

I have 2 monitors on my computer, also am writing a program on AS3 that is exported to standalone SWF . My task is to make my app fullscreen on 2nd screen. How can I do this?

I tried converting my project to AIR project. It is possible there by using nativeWindow property of Stage . (setting x coordinate so that it appears in second screen and then call fullscreen). It works in Flash, but when I'm running compiled swf outside Flash, my app crashes (nativeWindow property not found).

So please do help me to solve my problem. I am disappointed, have been looking for solution for already 3 days...

You have to stick with your AIR application and use it as it is supposed to: run the .air file. You can't launch an AIR swf alone because it will miss all the AIR runtime including the NativeWindow you are insterested in.

To be clear, you can't manipulate windows from a swf launched with the Flash Player.

Another solution would be to execute your swf from a web browser and use javascript called through ExternalInterface to move the windows. But it may be quite painful in comparison with AIR.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM