Help with News Ticker

Hello friends,

my english is weak.

I need help related to kirupa’s News Ticker Tutorial. I want the text to be fade in like it’s fade out. Currently the text does not come with fade in effect.

You can see the news ticker here:

http://intelkids.co.in/thumbnails/news_ticker.html

Pleaseeeeee help out from this. Thanks. :slight_smile:

Code:

function loadXML(loaded) {
if(loaded) {
xmlNode = this.firstChild;
caption = [];
url = [];
date = [];
total = xmlNode.childNodes.length;
for(i=0;i<total;i++) {
caption* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
url* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
date* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
}
first_item();
} else {
content = “file not loaded!”;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“news.xml”);

function first_item() {
delay = 5000;
p = 0;
display§;
p++;
}

function timer() {
myInterval = setInterval(ticker,delay);
function ticker() {
clearInterval(myInterval);
if(p == total) {
p = 0;
}
fadeout();
}
}

function display(pos) {
over = new TextFormat();
over.underline = true;
over.color = 0xFF0000;

out = new TextFormat();
out.underline = false;
out.color = 0x000000;

newsMC.newsText._alpha = 100;
newsMC.dateText._alpha = 100;
newsMC.newsText.text = caption[pos];
newsMC.dateText.text = date[pos];
/*newsMC.onRelease = function() {
    getURL(url[pos],"_self");
}
newsMC.onRollOver = function() {
    this.newsText.setTextFormat(over);
}
newsMC.onRollOut = function() {
    this.newsText.setTextFormat(out);
}*/
timer();

}

function fadeout() {
this.onEnterFrame = function() {
if(newsMC.newsText._alpha && newsMC.dateText._alpha >= 0) {
newsMC.newsText._alpha -= 5;
newsMC.dateText._alpha -= 5;
} else {
display§;
p++;
delete this.onEnterFrame;
}
}
}