Ciao ragazzi..
ho un problema ...
Il codice che segue mi genera questo movie...
prova-rss
Questo dovrebbe essere un ticker .. ma il problema č che, come noterete, il testo vā a capo...
io vorrei che il testo uscisse su una singola riga..
Ho provato, anche diminuendo l'altezza dell'area di testo e impostando la proprietā del campo testo, su "singola linea", ma non ho risolto.
come posso risolvere il problema?
questo č il codice:
codice:
// ************************************************
// Load XML data
// ************************************************
onLoad=function(){
loadDATA();
}
function loadDATA(){
var rss_xml:XML = new XML();
rss_xml.ignoreWhite = true;
rss_xml.onLoad = function(success:Boolean) {
if (success) {
processData(rss_xml);
} else {
trace("unable to load/parse cnet.xml");
}
};
//rss_xml.load("proxy.php");
rss_xml.load("rss.xml");
}
// ***********************************************
// Process Data
// ***********************************************
channel_title = "";
channel_desc = "";
channel_copyright = "";
channel_link = "";
channel_lang = "";
function processData(rm){
var rss = rm.firstChild.firstChild;
this.filmato.item_txt.text="";
this.filmato.item_txt.html = true;
this.filmato.item_txt.styleSheet = rss_css;
for (i=0;i<rss.childNodes.length;i++){
//trace(rss.childNodes[i].nodeName);
if (rss.childNodes[i].nodeName == "title"){
channel_title = rss.childNodes[i].firstChild.nodeValue;
}else if (rss.childNodes[i].nodeName == "description"){
channel_description = rss.childNodes[i].firstChild.nodeValue;
}else if (rss.childNodes[i].nodeName == "copyright"){
channel_copyright = rss.childNodes[i].firstChild.nodeValue;
}else if (rss.childNodes[i].nodeName == "link"){
channel_link = rss.childNodes[i].firstChild.nodeValue;
}else if (rss.childNodes[i].nodeName == "language"){
channel_lang = rss.childNodes[i].firstChild.nodeValue;
}else if (rss.childNodes[i].nodeName == "image"){
var sTitle;
var sLink; // link
var sURL; // logo url
txtLogo.html = true;
txtLogo.htmlText="";
for (j=0;j<rss.childNodes[i].childNodes.length;j++){
if (rss.childNodes[i].childNodes[j].nodeName == "title"){
sTitle = rss.childNodes[i].childNodes[j].firstChild.nodeValue;
}else if (rss.childNodes[i].childNodes[j].nodeName == "link"){
sLink = rss.childNodes[i].childNodes[j].firstChild.nodeValue;
}else if (rss.childNodes[i].childNodes[j].nodeName == "url"){
sURL = rss.childNodes[i].childNodes[j].firstChild.nodeValue;
}
}
}else if (rss.childNodes[i].nodeName == "item"){
var itemTitle;
var itemDesc;
var itemLink;
for (j=0;j<rss.childNodes[i].childNodes.length;j++){
if (rss.childNodes[i].childNodes[j].nodeName == "title"){
itemTitle = rss.childNodes[i].childNodes[j].firstChild.nodeValue;
}else if (rss.childNodes[i].childNodes[j].nodeName == "description"){
itemDesc = rss.childNodes[i].childNodes[j].firstChild.nodeValue;
}else if (rss.childNodes[i].childNodes[j].nodeName == "link"){
itemLink = rss.childNodes[i].childNodes[j].firstChild.nodeValue;
}
}
//rubriche = rss.childNodes[2].childNodes[2].firstChild.nodeValue;
//trace(rss);
//this.filmato.item_txt.htmlText += "<table bgcolor=\"#ff0000\" width=\"100%\" height=\"3px\" border=\"1\"><tr> <td> <a href=\"" + itemLink + "\"><font color=\"#003366\">" + itemTitle + "</font></a></td></tr></table>"
this.filmato.item_txt.htmlText+= "<a href=\"" + itemLink + "\"><font color=\"#003366\">" + itemTitle + "</font></a>"
}
}
}
grazie mille a tutti.