# Actionscript auto scroller

**URL:** <https://forum.kirupa.com/t/actionscript-auto-scroller/218297>\
**Category:** Uncategorized\
**Created:** [March 6, 2007, 3:59pm UTC](https://forum.kirupa.com/t/actionscript-auto-scroller/218297 "2007-03-06T15:59:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bzee](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@bzee](https://forum.kirupa.com/u/bzee)\
**Post date:** [March 6, 2007, 3:59pm UTC](https://forum.kirupa.com/t/actionscript-auto-scroller/218297/1 "2007-03-06T15:59:33Z")

</div>

I am new to these forums so I apologize if this question is stupid, but I have an rss feed that I am pulling from an xml file and I want to auto scroll it. Can anyone help me with this issue?

Here’s the code I am currently using.

#include “XMLSA.as”  
// Setup text fields  
body.autoSize = “right”;  
head.autoSize = “right”;  
body.text = “Loading ISU news stories”;  
// URL if the user clicks before data is loaded  
rssURL = “[http://www.indstate.edu](http://www.indstate.edu)”;  
// Load the XML/RSS  
news = new XMLSA();  
// Load the RSS file  
news.load(“[http://www.indstate.edu/news/rss/rss.xml](http://www.indstate.edu/news/rss/rss.xml)”);  
news.onLoad = function(success){  
if (success) {  
// Check RSS version and make shorthand  
if(news.channel[0].item){

// Where to find data items for RSS 0.91  
newsNode = news.channel[0];  
} else {

// Where to find data items for RSS 1.0 and 2.0  
newsNode = news;  
}

// Store the number of news items  
rssCount = newsNode.item.length;

// Call the showNext function every 30 seconds  
setInterval(showNext,30000);  
} else {

// Show error message  
body.text = “Error loading XML”;  
}  
}  
// Function for getting next entry  
showNext = function(){  
// Zero the counter if the last article has been shown  
if(rssCounter == rssCount || rssCounter == undefined){ rssCounter = 0; }

// Get values from XMLSA array  
head.text = newsNode.item[rssCounter].title.getValue();  
body.htmlText = newsNode.item[rssCounter].description.getValue();  
rssURL = newsNode.item[rssCounter].link.getValue();

// Position the body text below the heading  
body.\_y = head.\_y + head.\_height;

// Increment the counter  
rssCounter++;  
}
