Mi problema es el siguiente
estoy modificando el sistema de noticias xml con imagenes que ofrese "la compañia Clab" e logrado incluir una linea de texto mas pero cuando le doy las propiedades para que vincule a una web externa el resultado que devuelve es mostrar todos los contenidos del xml vincularme a un maravilloso INDEFINIDO
Gracias
Codigo AS
<code>//Permite caracteres tradicionales como letras con tilde la ñ, etc.
System.useCodepage = true;
//Se declara la variable indice de tipo número (utilizada para referencia la noticia a mostrar)
var indice:Number;
//Se declara la variable noticias_xml de tipo XML (utilizada para almacenar el documento xml)
var noticias_xml:XML;
/*
Funcion cargarDatos (utilizada para cargar y cambiar las noticias en el documento)
Esta función recibe un parámetro "_indice" que corresponde al elemento noticia a mostrar
*/
function cargarDatos(_indice:Number) {
//Se inicializan variables utilizadas para almenar los datos de una noticia
var fecha:String;
var titulo:String;
var mensaje:String;
//ESTE ES EL FRAGMENTO EN EL QUE ESTOY TRABAJANDO
var WEB:String;
var imagen:String;
//Recuperando datos del objeto xml
//Se accede al primer elemento [noticia] y se recupera la fecha desde el atributo [fecha]
fecha = noticias_xml.firstChild.childNodes[_indice].attributes.fecha;
//Se accede al primer hijo de elemento [noticia] y se recupera al valor del primer elemento de [titulo]
titulo = noticias_xml.firstChild.childNodes[_indice].firstChild.firstChild;
//Se accede al segundo hijo de elemento [noticia] y se recupera el valor del primer elemento de [mensaje]
mensaje = noticias_xml.firstChild.childNodes[_indice].firstChild.nextSibling.firstChild;
//Se accede al último hijo de elemento [noticia] y se recupera el valor del primer elemento de [imagen]
//ESTE ES EL FRAGMENTO EN EL QUE ESTOY TRABAJANDO
WEB ="<a href=\""+noticias_xml.firstChild.childNodes[_indice].attributes.URL+"\" target=\"_self\">"+noticias_xml.firstChild.childNodes+"</href>";
imagen = noticias_xml.firstChild.childNodes[_indice].lastChild.firstChild;
//Mostrando los datos recuperados en el cuado de texto mensaje_txt y cargando la imagen en pantalla_mc
_root.mensaje_txt.htmlText = "";
_root.mensaje_txt.htmlText += "<p align='center'><font color='#006633' size='12'><b>"+titulo+"</b></font></p>";
_root.mensaje_txt.htmlText += "<p><font size='10'>"+mensaje+"</font>";
//ESTE ES EL FRAGMENTO EN EL QUE ESTOY TRABAJANDO
_root.mensaje_txt.htmlText += "<font color='#003399' size='15'>"+WEB+"</font>";
_root.mensaje_txt.htmlText += "<font color='#666666' size='10'>Publicado: "+fecha+"</font></p>";
//Cargado la imagen JPG externa en el clip pantalla_mc con el valor recuperado del objeto xml
_root.pantalla_mc.loadMovie(imagen);
}
//Inicializaciones
indice = 0;
//inicializando indice en 0 para mostrar la primera noticia
//creando el objeto noticias_xml de typo XML
noticias_xml = new XML();
//Permite que el objeto XML ignore los espacios en blanco entre marca y marca del documento XML
noticias_xml.ignoreWhite = true;
//El método load() permite cargar el documento xml "noticias.xml"
noticias_xml.load("noticias.xml");
//El evento onLoad de activa cuado se haya cargado el documento noticias.xml
noticias_xml.onLoad = function() {
//Se llama a la funcion cragarDatos para mostar la primera noticia (esto por la variable indice en 0)
cargarDatos(indice);
};
</code>
Codigo XML
<code>
<?xml version="1.0" encoding="iso-8859-1"?>
<noticias>
<noticia fecha="14/04/2005">
<titulo>Nave rusa tripulada se acopla sin problemas a la Estación Espacial Internacional</titulo>
<mensaje>Moscú (dpa) - La nave rusa Soyuz, con tres tripulantes a bordo, se acopló hoy automáticamente sin problemas a la Estación Espacial Internacional (ISS) a las 02:20 GMT del domingo, informó hoy el centro de control de vuelo ruso cerca de Moscú.</mensaje>
<WEB URL="http://www.iiiiiiii.com">VINCULO</WEB>
<image>nave.jpg</image>
</noticia>
</noticias>
</code>
