function loadNews() { // xml objekti var xml:XML = new XML(); xml.ignoreWhite = true; // xml:n ladattua tiedon tallennus flash muuttujiin xml.onLoad = function() { // ekasta nodesta "rootti" var news:Array = xml.firstChild.childNodes; // tyhjät arrayt newsTitle = []; newsText = []; // arrayhin sijoitus for (var i = 0; i newsTitle[i] = texts[i].attributes.title; // xml nodesta foo newsText[i] = texts[i].firstChild.firstChild.nodeValue; } }; // xml tiedoston lataus xml.load("news.php"); }