从偶的blog的rss读取数据,顺便练习了一下Flist组件,一直不太喜欢用组件的,呵呵~
rss代码(由asp生成)地址:blogrss2.asp
fla代码:
myList.setSize(350, 240);
myList.rowHeight = 24;
var myXML = new XML();
myXML.load(“blogrss2.asp”);
myXML.ignoreWhite = true;
myXML.onLoad = function(success) {
if (success) {
for (i=7; i<17; i++) {
myList.addItem({label:myXML.childNodes[0].childNodes[0].childNodes[i].childNodes[1].firstChild.nodeValue});
}
}
};
listenerObject = new Object();
listenerObject.change = function(evt:Object) {
m=myList.selectedIndex+7;
fdurl=myXML.childNodes[0].childNodes[0].childNodes[m].childNodes[5].firstChild.nodeValue
getURL(fdurl);
};
myList.addEventListener(“change”, listenerObject);