# Would appreciate some help with script

**URL:** <https://forum.kirupa.com/t/would-appreciate-some-help-with-script/237717>\
**Category:** flash\
**Created:** [September 3, 2007, 3:37am UTC](https://forum.kirupa.com/t/would-appreciate-some-help-with-script/237717 "2007-09-03T03:37:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyzdesign](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@tyzdesign](https://forum.kirupa.com/u/tyzdesign)\
**Post date:** [September 3, 2007, 3:37am UTC](https://forum.kirupa.com/t/would-appreciate-some-help-with-script/237717/1 "2007-09-03T03:37:40Z")

</div>

I don’t know enough ActionScript to figure this one out. Brief Description on the Script : It’s a News Ticker that picks up the content from XML file and displays in dynamic text box (newsMC).

I would would appreciate if you guys could help me figure out how to make the news fly in from the top (still keeping fading feature).

Thanks a lot!

Here is the script so far:

```auto
 
function loadXML(loaded) { 
if (loaded) { 
xmlNode = this.firstChild; 
caption = []; 
url = []; 
total = xmlNode.childNodes.length; 
for (i=0; i<total; i++) { 
caption* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue; 
url* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue; 
} 
first_item(); 
} else { 
content = "file not loaded!"; 
} 
} 
xmlData = new XML(); 
xmlData.ignoreWhite = true; 
xmlData.onLoad = loadXML; 
xmlData.load("content2.xml");
// 
function first_item() { 
delay = 3000; 
p = 0; 
display(p); 
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 = false; 
// 
out = new TextFormat(); 
out.underline = false; 
// 
newsMC.newsText._alpha = 100; 
newsMC.newsText.text = caption[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>=0) { 
newsMC.newsText._alpha -= 5; 
} else { 
display(p); 
p++; 
delete this.onEnterFrame; 
} 
}; 
} 

```
