这一行字里面有这几个字就对

private var arr4:Array=[["晴"],["阴"]];
        public function Answer4(_mc:MovieClip ) {
            _mc["answerMc"].alpha=0;
            var txt:TextField=_mc["txt"] as TextField;
            txt.text=FouthFrame.answerArr[0];
            var txtStr:String=FouthFrame.answerArr[0];
            var arr:Array=[];
            for (var i:uint=0; i<txtStr.length; i++) {
                trace(txtStr.indexOf(arr4[i]))
                if (txtStr.indexOf(arr4[i])!=-1&&arr.indexOf(i)==-1) {
                    arr.push(i);
                }
            }


            if (arr.length==2) {
                funnum1();
            } else {
                _mc["answerMc"].alpha=1;
                _mc["right"].nextFrame();
            }

        }

posted on 2019-11-06 18:04  zqiang0803  阅读(127)  评论(0编辑  收藏  举报

导航