如何使用按钮使用ActionScript 3检查输入文本?

时间:2014-05-13 04:56:06

标签: actionscript-3 flash-cs6

我对动作脚本3很新,遇到了我正在建立的功能的问题。每次我测试它是否给我一个真实的陈述和if参数它声称它是假的(frgo3按钮)。这是代码:

var check:Boolean = false;
var input1:String;
var answer:String = "New_York_Harbor";

fr1check.addEventListener (MouseEvent.CLICK, checkfr);
frgo3.addEventListener (MouseEvent.CLICK, Moveonfr);
frno3.addEventListener (MouseEvent.CLICK, Movenofr);

function checkfr(event:MouseEvent):void{
    input1= frin.text;
    check = true;
    if(input1 == answer){
     frgo3.visible = true;}
    else  (
    {frno3.visible = false;}
}

function Moveonfr(event:MouseEvent): void{
    score =score +100;
        gotoAndPlay(5);
}

function Movenofr(event:MouseEvent): void{
gotoAndPlay(5);
}

我将如何解决此问题?

0 个答案:

没有答案