# Help with News Ticker

**URL:** <https://forum.kirupa.com/t/help-with-news-ticker/238709>\
**Category:** flash\
**Created:** [September 14, 2007, 4:09am UTC](https://forum.kirupa.com/t/help-with-news-ticker/238709 "2007-09-14T04:09:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mangesh](https://avatars.discourse-cdn.com/v4/letter/m/d78d45/32.png) [@Mangesh](https://forum.kirupa.com/u/Mangesh)\
**Post date:** [September 14, 2007, 4:09am UTC](https://forum.kirupa.com/t/help-with-news-ticker/238709/1 "2007-09-14T04:09:51Z")

</div>

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](http://intelkids.co.in/thumbnails/news_ticker.html)

Pleaseeeeee help out from this. Thanks. 🙂

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;  
}  
}  
}
