March 16, 2008 at 9:17 am (Uncategorized)
Today i tried to use the flash to read the XML file. And i find the flash can show the name of the XML data.
I have trid another flash program to connect the Web Service has the same problem.
The follow is menu problem:


The next is the web service problem:
Actually it’s should show the city name.

geforce2008 said,
March 15, 2008 at 9:21 am
My XML FILE:
(The wordpress automatic translate my XML code to this)
Trademe
NMIT
QQ
Gmail
My flash AS2.0 code:
stop();
menuXML = new XML();
menuXML.load(“myMenu.XML”);
menuXML.ignoreWhite = true;
menuXML.onLoad = function(success) {
if (success) {
menuItem = menuXML.firstChild.childNodes;
for (var i=0; i<menuItem.length; i++) {
item = _root.attachMovie(“itemClip”, “itemClip” + i, i);
item._x = 0;
item._y = 20*i;
item.itemLabel.text = menuItem.attributes.name;
item.myUrl = menuItem.attributes.url;
item.onRelease = function() {
getURL(nenuXML.myUrl, “_blank”);
}
}
}
}
And the problem is:
The menu is only show the “u”.
And the URL address is link to:
” file://localhost/D:/Course/Project3000/Flash%20site/Menu/undefined ”
Tutorials | Flash Navigation with Actionscript and XML | Lemlinh.com said,
August 6, 2008 at 12:21 pm
[...] FLASH read XML file problem [...]