flash如何调用xml里的文字和图片 30
flash里的代码:xmlData.ignoreWhite=true;varmcThis=this;varxmlData=newXML();xmlData.onLoad=...
flash里的代码:
xmlData.ignoreWhite = true;
var mcThis = this;
var xmlData = new XML();
xmlData.onLoad = function (success)
{
if (success)
{
mcThis.gotoAndStop("playing");
}
else
{
mcThis.gotoAndStop("failture");
} // end else if
};
xmlData.ignoreWhite = true;
xmlData.load("xml/data1.xml?" + random(1000));
Stage.align = "TL";
Stage.scaleMode = "noScale";
stop ();
xml里的代码:
<?xml version="1.0" encoding="utf-8"?>
<data>
<item url="http://myhhe.cn/" target="_blank" img="images/a1.jpg" thumb="images/a2.jpg" inside="内容1111"/>
<item url="http://myhhe.cn/" target="_blank" img="images/b1.jpg"
thumb="images/b2.jpg" inside="内容1111"//>
<item url="http://myhhe.cn/" target="_blank" img="images/c1.jpg"
thumb="images/c2.jpg" inside="内容1111"//>
<item url="http://myhhe.cn/" target="_blank" img="images/d1.jpg"
thumb="images/d2.jpg" inside="内容1111"//>
</data> 展开
xmlData.ignoreWhite = true;
var mcThis = this;
var xmlData = new XML();
xmlData.onLoad = function (success)
{
if (success)
{
mcThis.gotoAndStop("playing");
}
else
{
mcThis.gotoAndStop("failture");
} // end else if
};
xmlData.ignoreWhite = true;
xmlData.load("xml/data1.xml?" + random(1000));
Stage.align = "TL";
Stage.scaleMode = "noScale";
stop ();
xml里的代码:
<?xml version="1.0" encoding="utf-8"?>
<data>
<item url="http://myhhe.cn/" target="_blank" img="images/a1.jpg" thumb="images/a2.jpg" inside="内容1111"/>
<item url="http://myhhe.cn/" target="_blank" img="images/b1.jpg"
thumb="images/b2.jpg" inside="内容1111"//>
<item url="http://myhhe.cn/" target="_blank" img="images/c1.jpg"
thumb="images/c2.jpg" inside="内容1111"//>
<item url="http://myhhe.cn/" target="_blank" img="images/d1.jpg"
thumb="images/d2.jpg" inside="内容1111"//>
</data> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询