AS3: ERROR 1046: Typ wurde nicht gefunden oder war keine Kompilierungszeit-Konstante: Bühne, und TextField

So, ich mache ein Spiel und wenn ich Teste meine Klasse in eine Datei bekomme ich vier Fehler des gleichen Typs "1046: Typ wurde nicht gefunden oder war keine Kompilierungszeit-Konstante: Bühne und TextField'. Ich habe alles importiert, werfen Sie bitte einen Blick:

Spiel.als

package  {

import flash.display.Stage.*;
import flash.filter.GlowFilter.*;
import flash.text.TextField.*;
import flash.net.URLLoader.*;
import flash.net.URLRequest.*;
import flash.net.URLRequestMethod.*;
import flash.net.URLLoaderDataFormat.*;
import flash.net.URLVariables.*;


public class Game {

    public static const STATUS_MENU:int = 1;
    public static const STATUS_SURVIVAL:int = 2;
    public static const STATUS_MULTIPLAYER:int = 3;

    public static const GAME_RUN:int = 1;
    public static const GAME_PAUSE:int = 2;

    public static var palco:Stage;
    public static var profileName:Array; //Name, status, pass

    public function Game():void {
        trace("Class Game is online.");
    }

    public function transStage(sender:Stage):Stage {
        palco = sender;
        palco.align = StageAlign.BOTTOM_LEFT;
        palco.scaleMode = StageScaleMode.EXACT_FIT;
        palco.displayState = StageDisplayState.FULL_SCREEN;
        return(palco);
    }

    public function makeGlow(txt:TextField):void {
        var glow:GlowFilter = new GlowFilter(); 
        glow.color = 0xFFFFFF; 
        glow.alpha = 1; 
        glow.blurX = 4.5; 
        glow.blurY = 4.5; 
        glow.quality = BitmapFilterQuality.HIGH;
        txt.filters = [glow];

    }

    public function removeGlow(txt:TextField):void {
        txt.filters = [];
    }

    public function setStatus(current:int):void {
        var request1:URLRequest = new URLRequest("http://www.url.com/");
        var loader:URLLoader = new URLLoader();
        var vari:URLVariables = new URLVariables();
        vari.Profile = profileArray[1];
        switch (current) {
            case 1:
            vari.Status = 1;
            profileArray[2] = 1;
            break;
            case 2:
            vari.Status = 2;
            profileArray[2] = 2;
            break;
            case 3:
            vari.Status = 3;
            profileArray[2] = 3;
            break;
        }
        loader.dataFormat = URLLoaderDataFormat.VARIABLES;
        request1.data = vari;
        request1.method = URLRequestMethod.POST;
        loader.load(request1);
    }

    }
   }

Und hier ist die fla-Datei test:

import Game;

var manager:Game = new Game();

Auch, wenn Sie irgendwelche Vorschläge über die Art und Weise, die ich organisieren oder die Art und Weise habe ich diesen code hier bitte posten, denn ich bin ein Anfänger.

InformationsquelleAutor joaopenteado | 2011-10-31
Schreibe einen Kommentar