Flash更新后,Flash电影停止加载xml
我正在加载一个调用另一个调用XML文件的flash电影。在最近的flash player更新之前,它一直工作正常。现在我不知道如何让它工作。似乎什么都能装。任何帮助都将不胜感激 下面是调用XML的操作脚本Flash更新后,Flash电影停止加载xml,xml,flash,actionscript-2,Xml,Flash,Actionscript 2,我正在加载一个调用另一个调用XML文件的flash电影。在最近的flash player更新之前,它一直工作正常。现在我不知道如何让它工作。似乎什么都能装。任何帮助都将不胜感激 下面是调用XML的操作脚本 var feedMovie; //load the XML data mein_xml = new XML(); mein_xml.ignoreWhite = true; mein_xml.load("data.xml"); mein_xml.onLoad = functio
var feedMovie;
//load the XML data
mein_xml = new XML();
mein_xml.ignoreWhite = true;
mein_xml.load("data.xml");
mein_xml.onLoad = function(status) {
if (status) {
content_xml = mein_xml.firstChild.childNodes;
PhotoLoaderMC.loadMovie(content_xml[0].attributes.MapImage);
delete mein_xml;
initMenu();
}
};
// via this function, we set the detail's points position according to XML X&Y values
function SetPoints() {
var j = 0;
for (i=item; i<maxItems; i++) {
nName = "PointerMC"+j;
attachMovie("PointerMC", nName, j++);
if (content_xml[i] != undefined) {
this[nName]._y = content_xml[i].attributes.PY;
this[nName]._x = content_xml[i].attributes.PX;
this[nName].num.text = i+1;
this[nName].id_txt.text = content_xml[i].attributes.id;
this[nName].onPress = function() {
_global.detailMCClose = false;
daten = content_xml[this.num.text-1];
// this calls the detailMC for each detail point.
if (daten.attributes.PartID == "Image") {
attachMovie("detailMC-Image", "detailMCImage", 1000);
detailMCImage._alpha = 90;
detailMCImage._visible = true;
detailMCImage._x = 240;
detailMCImage._y = 200;
detailMCImage.photo = daten.attributes.photo;
detailMCImage.DescMC.desc.htmlText = daten.firstChild.firstChild.nodeValue;
detailMCImage.onEnterFrame = function() {
if (detailMCClose) {
removeMovieClip("detailMCImage");
_global.detailMCClose = false;
}
};
// this close detailMC for Image!
detailMCImage.CloseButton.onPress = function() {
_global.detailMCClose = true;
};
}
if (daten.attributes.PartID == "Movie") {
attachMovie("detailMC-Movie", "detailMCMovie", 1000);
detailMCMovie._alpha = 100;
detailMCMovie._visible = true;
detailMCMovie._x = 200;
detailMCMovie._y = 200;
detailMCMovie.feedMovie = daten.attributes.movie;
detailMCMovie.DescMC.desc.htmlText = daten.firstChild.firstChild.nodeValue;
detailMCMovie.onEnterFrame = function() {
if (detailMCClose) {
removeMovieClip("detailMCMovie");
_global.detailMCClose = false;
}
};
// this close detailMC for Movie!
detailMCMovie.CloseButton.onPress = function() {
_global.detailMCClose = true;
};
}
};
}
}
}
function initMenu() {
numbers = content_xml.length;
max = content_xml.length;
maxItems = content_xml.length;
item = 0;
}
var电影;
//加载XML数据
mein_xml=new xml();
mein_xml.ignoreWhite=true;
load(“data.xml”);
mein_xml.onLoad=函数(状态){
如果(状态){
content_xml=mein_xml.firstChild.childNodes;
PhotoLoaderMC.loadMovie(内容\u xml[0].attributes.MapImage);
删除我的xml;
initMenu();
}
};
//通过此函数,我们根据XML X&Y值设置细节点的位置
函数设定点(){
var j=0;
(i=项目;休斯顿州立大学SBDC
2302范宁,200号套房,德克萨斯州休斯顿77002
713-752-8444
第三病房:713-520-7303
服务县:哈里斯东区、第五病房和第三病房]]>
德克萨斯州卢夫金南第一街3500号安杰丽娜学院SBDC,邮编75901-1768
936-633-5400
服务县:安杰丽娜、波尔克、三一、泰勒]]>
您的示例xml有一个错误,以should be结尾。此代码是捕获xml错误的2而不是3感谢。我已修复了此错误,但仍然无法加载或加载xml。添加事件侦听器并尝试..catcharoundload()
要捕获任何安全性或io错误,2代码仍应在新播放器下运行。我们的播放器可以。但我相信我们正在使用不同的方法加载XML。
<?xml version="1.0" encoding="utf-8"?>
<contents>
<Item PartID="Image" PX="570" PY="240" photo="/images/network/FlashMap/centers/UH.gif" MapImage="/images/network/FlashMap/image/Counties.png" Number="1">
<details>
<![CDATA[<b><font size="+1" color="#ffffff">University of Houston SBDC <br>2302 Fannin, Suite 200 <br>Houston, TX 77002 <br>713-752-8444<br>Third Ward: 713-520-7303<br></font></b><br><a href="http://www.sbdc.uh.edu" target="_blank">www.sbdc.uh.edu</a><br><br>Counties served: Harris-East End, Fifth Ward and Third Ward]]></details>
</Item>
<Item PartID="Image" PX="675" PY="40" photo="/images/network/FlashMap/centers/angelina.jpg" Number="2">
<details><![CDATA[<b><font size="+1" color="#ffffff">Angelina College SBDC, Lufkin<br>3500 South First St. <br>Lufkin, TX 75901-1768 <br>936-633-5400<br><br></font></b><br><a href="http://www.angelina.cc.tx.us/" target="_blank">www.angelina.cc.tx.us </a><br><br>Counties served: Angelina, Polk, Trinity, Tyler]]></details>
</Item>
</content>