Tema: variables
Ver Mensaje Individual
  #6 (permalink)  
Antiguo 26/04/2007, 11:59
rafa28
 
Fecha de Ingreso: julio-2002
Mensajes: 195
Antigüedad: 21 años, 9 meses
Puntos: 0
Re: variables

No, lo siento, no se como usarla, pero me voy a poner ahora a buscar información sobre ella, y así podré entender lo que me tengas que decir.
Si te sirve, esto es lo que tengo en el frame que me muestra os resultados del xml. Lo he hecho sin saber muy bien como lo hacía, leyendo cosas de donde podía, pero el caso es que funciona:

System.useCodepage = true;
var agenda_noticias: XML = new XML();
agenda_noticias.ignoreWhite = true;
stop();
_root.createEmptyMovieClip("contenedor",5);
contenedor._y = 170;
contenedor._x = 0;
function parsea (exito: Boolean){
if (exito){
// Creo un nuevo mc para un rectángulo con las dimensiones para la peli _root.createEmptyMovieClip("mc_msk", 301);
mc_msk._y = 170;
mc_msk._x = 145;
// Dibujo el rectángulo (en este caso de 530px de ancho por 350px de alto)
with (mc_msk) {
beginFill(0xff0000, 50);
lineStyle(1, 0x00ff00, 100);
lineTo(600, 0);
lineTo(600, 350);
lineTo(0, 350);
lineTo(0, 0);
endFill();
}
// Enmascaro el listado con el recuadro
_root.contenedor.setMask(mc_msk);
intPosicionFecha = 0;
intPosicionTitulo = 0;
intPosicionCuerpo = 0;
intSeparar = 105;
for (var i=0; i <this.firstChild.childNodes.length; i++){
contenedor.attachMovie("mc_fecha", "mc_fecha"+i, i+1);
contenedor["mc_fecha"+i]._y = (intPosicionFecha*intSeparar);
contenedor["mc_fecha"+i]._x = 150;
contenedor["mc_fecha"+i].fecha = this.firstChild.childNodes[i].attributes.FECHA;
intPosicionFecha++;
}
for (var a=0; a<this.firstChild.childNodes.length; a++){
contenedor.attachMovie("mc_titulo", "mc_titulo"+a, a+100);
contenedor["mc_titulo"+a]._y = (intPosicionTitulo*intSeparar);
contenedor["mc_titulo"+a]._x = 250;
contenedor["mc_titulo"+a].titular = this.firstChild.childNodes[a].attributes.TITULO;
intPosicionTitulo++;
}
//-------- botón para ver la noticia desplegada NO ME SALE!!!
for (var e=0; e<this.firstChild.childNodes.length; e++){
contenedor.attachMovie("mc_noti_btt", "mc_noti_btt"+e, e+50);
contenedor["mc_noti_btt"+e]._y = (intPosicion*intSeparar);
contenedor["mc_noti_btt"+e]._x = 400;
contenedor["mc_noti_btt"+e].id = this.firstChild.childNodes[e].attributes.ID;
intPosicion++;
}
//-------- botón ver
// ------- cuerpo de la noticia
for (var i=0; i<this.firstChild.childNodes.length; i++){
for (var j=0; j<this.firstChild.childNodes[i].childNodes.length;j++){
contenedor.attachMovie("mc_cuerpo", "mc_cuerpo"+i, i+200);
contenedor["mc_cuerpo"+i]._y = 14+(intPosicionCuerpo*intSeparar);
contenedor["mc_cuerpo"+i]._x = 190;
contenedor["mc_cuerpo"+i].cuerpo = this.firstChild.childNodes[i].childNodes[j].attributes.cuerpo;
intPosicionCuerpo++;
}}

}
else {
trace("error");
}
}
agenda_noticias.onLoad=parsea;
agenda_noticias.load("noticias.xml");
__________________
EL conocimiento es la base del poder