Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/12/2008, 10:00
mariorr
 
Fecha de Ingreso: abril-2008
Mensajes: 13
Antigüedad: 16 años, 1 mes
Puntos: 0
href abra página en blanco

Hola tengo este codigo de AS2 metido en un flash para un lector de noticias rss y necesito que las noticias al pinchar en ellas se abran en págian distinta a la que estan (_blank), ¿cómo lo puedo hacer?.
Muchas gracias por anticipado.

un saludo

var rssurl:String = "http://d.yimg.com/cp/rss/medio-ambiente.xml";
//var rssurl:String = "http://www.dynamis-er.com/news.rss";
var rssxml:XML = new XML();
rssxml.ignoreWhite = true;
rssxml.load(rssurl);
rssxml.onLoad = function() {
var nodo:XMLNode = rssxml.firstChild.firstChild;
var vtit:String = "";
var vurl:String = "";
var vdes:String = "";
var vcon:String = "";

for (i=0; i<nodo.childNodes.length; i++) {
var snodo:XMLNode = nodo.childNodes[i];
switch (snodo.nodeName) {
case "title":
vtit = snodo.firstChild.nodeValue;
break;
case "link":
vurl = snodo.firstChild.nodeValue;
break;
case "description":
vdes = snodo.firstChild.nodeValue;
break;
case "item":
vcon = vcon + getContent(snodo);
break;
}
}
txttitle.text = "Últimas noticias";
txtdescription.text = vdes;
txtcontent.htmlText = vcon;
}

function getContent(vxml) {
var stit:String = "";
var surl:String = "";
var sdes:String = "";
for (j=0; j<vxml.childNodes.length; j++) {
var sxml:XMLNode = vxml.childNodes[j];
switch (sxml.nodeName) {
case "title":
vtit = sxml.firstChild.nodeValue;
break;
case "link":
vurl = sxml.firstChild.nodeValue;
break;
case "description":
vdes = sxml.firstChild.nodeValue;
break;
}
}
return "<a href=\""+vurl+"\"><b><font color=\"#868788\">"+vtit+"</font></b></a><br>"+vdes+"<br><br>";
}