电脑扩展成双屏后,全屏flash只在主屏里全屏?

2025-04-06 03:48:44
推荐回答(1个)
回答1:

网友:以下是解决方案,这是一个小实例:
package

{

import flash.display.Screen;

import flash.display.Sprite;

import flash.geom.Rectangle;

public class MultipleMonitorsFullscreenExample extends Sprite

{

public function MultipleMonitorsFullscreenExample()

{

var screens:Array = Screen.screens;

var rect:Rectangle = new Rectangle();

for (var i:int = 0; i < screens.length; i++)

{

rect = rect.union(screens[i].bounds);

}

trace(rect);

this.stage.nativeWindow.bounds = rect;

}

}

}
复制代码
修改 MultipleMonitorsFullscreenExample-app.xml
添加 none

源码下载(我的air是3.4的,你根据你的环境自己改动):