import com.cybozuLab.rssParser.*; stop(); var rssIntervalId = 0; var index = 0; var thisObj = this; // We'll populate this array with information from the feed var arr_XMLHash:Array = new Array(); // initialize feed var rssObj = new FetchingRss( "http://www.allflashwebsite.com/demo2/rss" ); // Initialize the AFWTextSlider on the stage // displays feed content ts_mc.setBackgroundAlpha(0); ts_mc.setSelectable(false); ts_mc.setControlsEnabled(false); ts_mc.loadStyle("afw.css"); ts_mc.startTimerScroll(); // define the function when loading is completed rssObj.onLoad = function( successFL, errMsg ) { if( successFL ) { thisObj.readRss(); } else { trace( errMsg ); } } // start loading rssObj.load(); // onLoad calls this function to process the feed function readRss() { var rssData:Object = rssObj.getRssObject(); // process the rss data into arr_XMLHash for( var i=0; i0) { fx2.setText(arr_XMLHash[0].title); fx1.setText(arr_XMLHash[index].date); ts_mc.fadeText(arr_XMLHash[0].desc); rssIntervalId = setInterval(this, "rssIntervalCallback", 13000); } } // This function displays the next feed function rssIntervalCallback() { if (arr_XMLHash.length == 0) return; index++; if (index >= arr_XMLHash.length) index = 0; fx2.setText(arr_XMLHash[index].title); fx1.setText(arr_XMLHash[index].date); ts_mc.fadeText(arr_XMLHash[index].desc); } // this function should theoretically display the link somehow feedButton.onRelease = function () { trace("clicked"); }