我正在制作AS3平台游戏。我不知道为什么,但它不会全屏......
这是我的代码:
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.getTimer;
import flash.display.StageScaleMode;
import flash.events.MouseEvent;
public class PlatformGame extends MovieClip {
// movement constants
static const gravity:Number = .004;
// screen constants
static const edgeDistance:Number = 100;
// object arrays
private var fixedObjects:Array;
private var otherObjects:Array;
// hero and enemies
private var hero:Object;
private var enemies:Array;
// game state
private var playerObjects:Array;
private var gameScore:int;
private var gameMode:String = "start";
private var playerLives:int;
private var lastTime:Number = 0;
// start game
public function startPlatformGame() {
addEventListener(Event.ADDED_TO_STAGE, startGame);
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
playerObjects = new Array();
gameScore = 0;
gameMode = "play";
playerLives = 3;
}
你知道可能是什么问题吗? (我只是把我的代码放在首位,如果你认为我放了所有代码是必要的,不要犹豫告诉我)
答案 0 :(得分:0)