Foros del Web » Creando para Internet » Flash y Actionscript »

duda con xml hacer un unload

Estas en el tema de duda con xml hacer un unload en el foro de Flash y Actionscript en Foros del Web. hola que tal amigos Necesito resolver el siguiente dilema o problema Estoy cargando una noticia dinamica a traves de flash con xml y mi xml ...
  #1 (permalink)  
Antiguo 29/04/2009, 13:25
 
Fecha de Ingreso: noviembre-2005
Mensajes: 117
Antigüedad: 18 años, 6 meses
Puntos: 1
duda con xml hacer un unload

hola que tal amigos

Necesito resolver el siguiente dilema o problema

Estoy cargando una noticia dinamica a traves de flash con xml y

mi xml se llama news.xml

/*********Mi XML*************/

<noticia link="../portada.php">

<foto>thumb.jpg</foto>
<titulo>Este título será el destacado de noticia</titulo>
<bajada>continuamos con el desarrollo de la información referente a esta increíble noticia</bajada>

</noticia>

/*********Mi XML*************/

Bien y necesito decirle a mi swf que si no hay nada para <titulo></titulo> el xml que se cargo en mi flash no se cargue osea que si esta en blanco el titulo no carga el xml y si hay un titulo SI lea news.xml



ahora en mi flash lo construyo de la siguiente manera

/**********Mi FLsah**********/

System.useCodepage = true;

var ruta = _root.cont_mc.mc_noticias;

/*-----------------crear XML---------------------*/
var noticia:XML = new XML();
noticia.ignoreWhite = true;

noticia.onLoad = function() {
/*if( noticia.firstChild.childNodes[1].firstChild.nodeValue == ""){
//descargar el xml
}else{ */
ruta.link = noticia.firstChild.attributes.link;
ruta.foto = noticia.firstChild.childNodes[0].firstChild.nodeValue;
ruta.titulo.text = noticia.firstChild.childNodes[1].firstChild.nodeValue;
titular = noticia.firstChild.childNodes[1].firstChild.nodeValue;
detalle = noticia.firstChild.childNodes[2].firstChild.nodeValue;
ruta.imagen.loadMovie("images/"+ _root.cont_mc.mc_noticias.foto);
//}

_root.cont_mc.mc_noticias.boton.onRelease = function() {
getURL(_root.cont_mc.mc_noticias.link);
};
ruta.titulo.text = substring(titular, 0, 40);
ruta.bajada.text = substring(detalle, 0, 148) + "...";


};

noticia.load("news.xml");

/**********Mi FLsah**********/


Pero no se como pordria hacerlo, que si titulo.text es = "" (Nada) mi news.xml haga un unload


HELP

Gracias Saludos
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:44.