我正在加载一个调用另一个调用 XML 文件的 flash 电影。在最近的 Flash 播放器更新之前,它一直可以正常工作。现在我不知道如何让它工作。似乎加载了所有内容。任何帮助将不胜感激!
这是调用 XML 的操作脚本
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;
}
这是 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>