Thanks for getting back to me. We actually figured it out. Now I have another question/problem.
We no longer want the date to scroll. It is going to be a semi static title. However I would like it to be populated from xml. This is what my as looks like currently, and everything works but the m_date. Thanks for any help.
[code] var incre:Number = 0; var newsArray:Array = new Array();
xmlData = new XML ;
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
//xmlData.load(contentxml);
xmlData.load(“news.xml”
;
function loadXML(loaded) { if (loaded) { rootNode = this.firstChild; var totalMenu:Number = rootNode.childNodes.length; };
s_pausecountdown = 2; //int(rootNode[0].attributes.pausecountdown);
s_maxChar = 95; //int(rootNode[0].attributes.maxChar);
s_uppercase = true; //rootNode[0].attributes.uppercase;
}
//s_title = rootNode.childNodes[0].firstChild.nodeValue;
for (i=1; i<totalMenu; i++) {
var m_headline:String = rootNode.childNodes[i].childNodes[1].firstChild.nodeValue;
m_link = rootNode.childNodes[i].childNodes[2].firstChild.nodeValue;
m_date = rootNode.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
m_target = "";//rootNode[i].attributes.target;
//
}
//trace(menuArray[0]);
gotoAndPlay("in");
title_txt.text = m_date;
if (s_uppercase == "true") {
var m_headline:String = m_headline.toUpperCase();
}
//
if (s_maxChar>0) {
//trace(m_headline.length)
if (m_headline.length>s_maxChar) {
var m_headline:String = m_headline.substr(0, s_maxChar)+"...";
}
}
newsArray.push([m_headline, m_link, m_target]);
var myStyle:TextField.StyleSheet = new TextField.StyleSheet();
//myStyle.load(“sample.css”
;
//t2.styleSheet = myStyle;
t2.underline= true; t2.html = true;
[/code]
Posted about 1 year ago














