Flash里需要调用XML文件里面的图片和文字,不知道怎么调用xml文件
展开全部
var folder:String = "";
var total:Number;
var nodes;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {
nodes = xml.firstChild.childNodes;
total = nodes.length;
t.xie.loadMovie(folder+nodes[i-1].attributes.filename);
t.txt.text = nodes[i-1].attributes.text;
}
xml.load("p1.xml");
加载 调用xml
var total:Number;
var nodes;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {
nodes = xml.firstChild.childNodes;
total = nodes.length;
t.xie.loadMovie(folder+nodes[i-1].attributes.filename);
t.txt.text = nodes[i-1].attributes.text;
}
xml.load("p1.xml");
加载 调用xml
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询