any idea why, or how to fix this?
The tutorial sample has ‘single line’ selected for its text box, but even after changing this to multiline it doesn’t work.
The ticker is a great tool, but of no use if it’s limited to single lines.
http://www.kirupa.com/developer/mx2004/newsticker.htm
Thanks!
G111
March 30, 2006, 9:16am
2
ChadT523:
any idea why, or how to fix this?
The tutorial sample has ‘single line’ selected for its text box, but even after changing this to multiline it doesn’t work.
The ticker is a great tool, but of no use if it’s limited to single lines.
kirupa.com - News Ticker
Thanks!
Easy fix off top of my head (domn’t know if it will work in flash i don’t touch it), reduce the font size of the text box or watever it is and just use newline charcters.
e.g.
“My First Line
My Second Line”
I added another node to the script and of course to the xml file. Track discription below.
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
caption = [];
url = [];
discription = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
caption* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
url* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
discription* = 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?blarg=”+new Date().getTime());
//
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;
//
out = new TextFormat();
out.underline = false;
//
newsMC.newsText._alpha = 200;
newsMC.newsText.text = caption[pos]
newsMC.disText._alpha = 200;
newsMC.disText.text = discription[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.disText._alpha>=0){
newsMC.newsText._alpha -= 5;newsMC.disText._alpha -= 5;
} else {
display§;
p++;
delete this.onEnterFrame;
}
};
}
or you could just set the textbox’s word wrap setting to true, im not sure exactly what it is so check the flash dictionary because i know it’s there ;/
BFDEXP
April 5, 2006, 4:44pm
5
Do you have an example of this or can you send me the fla>?