Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 Actionscript帮助:生成的TextField()未出现?_Actionscript 3_Class_Flash_Text_Field - Fatal编程技术网

Actionscript 3 Actionscript帮助:生成的TextField()未出现?

Actionscript 3 Actionscript帮助:生成的TextField()未出现?,actionscript-3,class,flash,text,field,Actionscript 3,Class,Flash,Text,Field,谢谢你检查我的问题。我尝试了很多不同的方法,但我看不出我的错误在哪里 function addHighScore() { //highscoreTable.defaultTextFormat = myFormat; var highscoreTable: TextField = new TextField(); highscoreSec[indx] = hsSeconds; highscoreTable.text = "CAN YOU SEE MEEEE???";

谢谢你检查我的问题。我尝试了很多不同的方法,但我看不出我的错误在哪里

function addHighScore() {
    //highscoreTable.defaultTextFormat = myFormat;
    var highscoreTable: TextField = new TextField();
    highscoreSec[indx] = hsSeconds;
    highscoreTable.text = "CAN YOU SEE MEEEE???";
    highscoreMS[indx] = hsMilliSec;
    addChild(highscoreTable);
    highscoreTable.border = true;
    highscoreTable.x = (stage.width - highscoreTable.width) / 2;
    highscoreTable.y = (stage.height - highscoreTable.height) / 2;
    indx++;
}

我还导入了flash.text.TextField

此代码位于何处?从导入中删除,您不想调用构造函数,只想导入类。这可能不是问题的原因。可能文本字段在那里,但白色文本位于白色上。还要检查EmbeddeFonts是否为false,以及myFormat是否设置为使用嵌入式字体。