import gs.dataTransfer.XMLParser; stop(); var url = "http://www.allflashwebsite.com/demo3/xml?limit=1§ion="; // setup the title and desc movies ts_title_mc.setBackgroundAlpha(0); ts_title_mc.setSelectable(false); ts_title_mc.setControlsEnabled(false); ts_title_mc.loadStyle("afw.css"); ts_desc_mc.setBackgroundAlpha(0); ts_desc_mc.loadStyle("afw.css"); // frame1 should have initialized pathInit if (pathInit != undefined) setPath(pathInit); function loadArticle(section, url_title) { var parsed_obj = {}; XMLParser.load(url+section+"&url_title="+url_title, onArticleLoaded, parsed_obj); } //This function gets called as soon as the XML loads and gets parsed. function onArticleLoaded(success_boolean, results_obj, xml) { if (success_boolean) { var item = results_obj.item[0]; var title = "

"+item.title[0].value+"

"; var desc = item.description[0].value; var img_url = item.image[0].img[0].src; loader_mc.image.removeMovieClip(); loader_mc.loadMovie(img_url, "image"); ts_title_mc.fadeText(title); ts_desc_mc.fadeText(desc); results_obj = {}; } else { trace("article.swf unable to load XML!!"); } } function setPath(path) { loadArticle(path[0], path[1]); }