as3.0 获取XML内容

    public static function xmlFun() {
            flashXml = new XML();
            xml_loader = new URLLoader();
            xml_loader.load(new URLRequest("IP.xml"));
            xml_loader.addEventListener(Event.COMPLETE, xmlComplete);
        }

        public static function xmlComplete(e: Event) {
            flashXml = XML(e.target.data);
            idStr = flashXml.user[0].@IP.toString()
            portNum = Number(flashXml.user[0].@port)

        }

 

posted on 2021-03-15 11:13  zqiang0803  阅读(44)  评论(0编辑  收藏  举报

导航