有趣的bug。我想你可以通過在全屏時自行縮放和定位內容來解決它。與設置fullScreenSourceRect
相比,這可能會影響性能,但至少應該起作用。
一個例子(在你的文檔類使用):
protected var fakeFullScreenSourceRect:Rectangle;
public function Main() {
this.stage.scaleMode = StageScaleMode.NO_SCALE;
this.fakeFullScreenSourceRect = new Rectangle(30, 30, 400, 200);
this.stage.addEventListener(Event.RESIZE, handleResize);
}
protected function handleResize(e:Event):void {
if (this.stage.displayState == StageDisplayState.FULL_SCREEN || this.stage.displayState == StageDisplayState.FULL_SCREEN_INTERACTIVE) {
if (this.fakeFullScreenSourceRect) {
this.scaleX = this.stage.stageWidth/this.fakeFullScreenSourceRect.width;
this.scaleY = this.stage.stageHeight/this.fakeFullScreenSourceRect.height;
this.x = -this.fakeFullScreenSourceRect.x * this.scaleX;
this.y = -this.fakeFullScreenSourceRect.y * this.scaleY;
}
} else {
this.x = this.y = 0;
this.scaleX = this.scaleY = 1;
}
}
感謝您的答案。我嘗試過這種解決方案,但由於性能大幅下降,這種解決方案並不令人滿意。 「原生」調整大小會更好,並且是在Windows上。再次感謝您的幫助。 – drunkcat