我有一个字符串数组:
private var phrase:Array = ["You will be given a series of questions like this:\n2 + 2 =\n(click or press ENTER to continue)","You can use the Keyboard or Mouse\nto deliver the answer\n\"ENTER\" locks it in.\n(click or press ENTER to continue)","\nClick Here\n to start."];
我在脚本后面有一个条件来查看 是否phrase[0]
等于instructText.text
,所以我在赋值之后直接放了一个“测试”,如下所示:
instructText.text = phrase[0];
if (instructText.text == phrase[0]) {
trace("phrase zero");
}
else {
trace("nottttttttt");
}
//OUTPUT: nottttttttt
我尝试了 和 的各种组合phrase[0] as String
,String(phrase[0])
但没有任何运气。
我错过了什么?