天天看點

flash中讀取XML問題[FLASH AS 部分]

var ts:XML = new XML();

ts.load("xml.xml");

ts.ignoreWhite = true;

ts.onLoad = function(good:Boolean) {

   if (good) {

      //_root.txt.text = ts.firstChild.childNodes[0].firstChild.firstChild.nodeValue

       trace(ts.firstChild.childNodes[1].firstChild.nodeValue )

      _root.txt.text = ts.childNodes[1].firstChild.firstChild.nodeValue

   }

};

 //這是FLASH裡AS部分,為了讀取XML的MATOKU字段名

繼續閱讀