调软键盘

package com{
    import flash.display.MovieClip;
    import flash.display.SimpleButton;
    import flash.events.MouseEvent;
    import flash.text.TextField;
    import flash.system.fscommand;

    public class FristFrame extends MovieClip {

        private var thisMc:MovieClip;
        private var txtMc:MovieClip;
        public static var answerArr:Array = [];

        private var nextBtn:SimpleButton;
        public function FristFrame(_thisMc:MovieClip,_txtMc:MovieClip) {
            thisMc = _thisMc;
            txtMc = _txtMc;
            txtMc.addEventListener(MouseEvent.CLICK,txtMcFun);

            for (var i:uint =0; i<txtMc.numChildren; i++) {
                TextField(txtMc.getChildAt(i)).text = "";
            }

        }
        private function txtMcFun(e:MouseEvent) {
            fscommand("exec","osk.exe");
        }
        public function nextFun(_nextBtn:SimpleButton ) {
            nextBtn = _nextBtn;
            nextBtn.addEventListener(MouseEvent.CLICK,onNextBtn);
        }
        private function onNextBtn(e:MouseEvent) {
            for (var i:uint =0; i<txtMc.numChildren; i++) {
                var txt:TextField = txtMc.getChildAt(i) as TextField;
                answerArr.push(txt.text);
            }
            thisMc.nextFrame();
            txtMc.removeEventListener(MouseEvent.CLICK,txtMcFun);
            nextBtn.removeEventListener(MouseEvent.CLICK,onNextBtn);
            trace(answerArr);
        }

    }

}

 

posted on 2019-04-16 15:04  zqiang0803  阅读(133)  评论(0编辑  收藏  举报

导航