Bien, eso es por la codificación interna del archivo. Si te fijas, en el
notepad al escribir un archivo y poner "guardar como..." aparecen varias
opciones de codificación interna (aunque sea texto plano), por lo que
imagino que debía haber algo raro en la codificación interna del fichero.
Yo lo había pegado desde notepad, por lo que por eso me funcionaba eso a la
primera. Pero no estaría de más que pusieras en la primera línea del XML
algún tipo de codificación del tipo:
<?xml version="1.0" encoding="UTF-8"?>

Bueno, al menos ya lo has arreglao :) 

-----Mensaje original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre
de sergio arranz
Enviado el: domingo, 26 de noviembre de 2006 15:23
Para: asnativos@5dms.com
Asunto: Re: [ASNativos] problemas con xml

Ya esta solucionado, he escrito el xml en el notepad y no en el dreamweaver,
no me preguntes como pero funciona.


>From: "sergio arranz" <[EMAIL PROTECTED]>
>Reply-To: Lista dedicada a Actionscript <asnativos@5dms.com>
>To: asnativos@5dms.com
>Subject: Re: [ASNativos] problemas con xml
>Date: Sun, 26 Nov 2006 14:10:11 +0000
>
>He probado incluso el código que has puesto y me sigue saliendo undefined.
>esto es cosa de enanos.
>
>
> >From: "David Bravo" <[EMAIL PROTECTED]>
> >Reply-To: Lista dedicada a Actionscript <asnativos@5dms.com>
> >To: "'Lista dedicada a Actionscript'" <asnativos@5dms.com>
> >Subject: Re: [ASNativos] problemas con xml
> >Date: Sun, 26 Nov 2006 14:57:13 +0100
> >
> >Pos no sé, tío. El XML está bien conformado, y yo he hecho una prueba
> >básica
> >y me carga perfectamente los atributos:
> >
> >-----------init code  ----------
> >var glosarioXML:XML = new XML();
> >System.useCodepage = true;
> >
> >glosarioXML.ignoreWhite = true;
> >glosarioXML.onLoad = function(success) {
> >     if (success) {
> >             trace
> >(this.firstChild.firstChild.firstChild.attributes["cliente"]);
> >             trace
> >(this.firstChild.firstChild.firstChild.attributes["breafing"]);
> >             trace
> >(this.firstChild.firstChild.firstChild.attributes["tecnologia"]);
> >     } else {
> >             trace("Error");
> >     }
> >
> >}
> >
> >glosarioXML.load("prueba.xml");
> >
> >-----------fin code ----------
> >A ver si es que estás usando attributes.cliente en vez de
> >attributes["cliente"] (me queda un poco oscuro en tu código, porque ya
> >llegas con el XMLdepurado...)  :?
> >
> >-----Mensaje original-----
> >De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En
> >nombre
> >de sergio arranz
> >Enviado el: domingo, 26 de noviembre de 2006 14:28
> >Para: asnativos@5dms.com
> >Asunto: Re: [ASNativos] problemas con xml
> >
> >Perdona, este es el código Flash:
> >
> >
> >function trabajos() {
> >     for (var i:Number = 0; i<secciones.length; i++) {
> >             var cargaSeccion = trabajos_mc.attachMovie("bot", "bot"+i,
> >i);
> >             cargaSeccion._x = i*72;
> >             // creamos el puntero
> >             cargaSeccion.puntero = i;
> >             // pintamos el nombre de las secciones
> >             cargaSeccion.textoBoton_mc.botones_txt.text = secciones[i];
> >             // ahora le damos el evento on press para poder pinchar en
> >ellas
> >             cargaSeccion.onPress = function() {
> >                     // la variable seleccionaBoton es igual al puntero
> >                     seleccionaBoton = this.puntero;
> >                     // la variable listado es igual a
> >cargaTrabajos.firstChild.childNodes;.
> >                     var listado:Array = new Array();
> >                     // es la ruta del primer nodo
> >                     listado = cargaTrabajos.firstChild.childNodes;
> >                     // estas variables son para posicionar el mc de las
> >miniaturas
> >                     var posX:Number = 0;
> >                     var posY:Number = 0;
> >                     //PRECARGA MINIATURAS
> >                     mini_mc.onEnterFrame = function() {
> >                             var cargado:Number =
> >mini_mc.getBytesLoaded();
> >                             var total:Number = mini_mc.getBytesTotal();
> >                             var porcentaje:Number = (cargado*100)/total;
> >                             if (cargado == total && cargado>4) {
> >                                     this.removeMovieClip();
> >                             }
> >                             this.mini_mc.preload_mc._xscale =
> >porcentaje;
> >                     };
> >                     var arrayMiniaturas:Array = new Array();
> >                     arrayMiniaturas =
> >listado[seleccionaBoton].childNodes;
> >                     var miniat_mc:MovieClip =
> >mini_mc.createEmptyMovieClip("miniaturas_mc",
> >10);
> >                     miniat_mc._x = 0;
> >                     miniat_mc._y = -55;
> >                     for (i=0; i<arrayMiniaturas.length; i++) {
> >                             var xmlDepurado:XML = new XML();
> >                             xmlDepurado = arrayMiniaturas[i];
> >                             var clip_mc:MovieClip =
> >miniat_mc.attachMovie("mini", "mini"+i, i);
> >                             //identifica y relaciona
> >
> >clip_mc.foto_mc.loadMovie(xmlDepurado.attributes.miniatura);
> >                             clip_mc.huecoFoto =
> >xmlDepurado.attributes.grande;
> >                             clip_mc.infoCliente =
> >xmlDepurado.attributes.cliente;
> >                             clip_mc.infoActividad =
> >xmlDepurado.attributes.actividad;
> >                             clip_mc.infoBreafing =
> >xmlDepurado.attributes.breafing;
> >                             clip_mc.infoTecnologia =
> >xmlDepurado.attributes.tecnologia;
> >                             // cuando pincho pinto en la pantalla lo
> >relativo a los atributos
> >                             clip_mc.onPress = function() {
> >                                     fotoDetalle(this.huecoFoto);
> >
> >trace(xmlDepurado.attributes.cliente);
> >
> >trace(xmlDepurado.attributes.actividad);
> >
> >trace(xmlDepurado.attributes.breafing);
> >
> >trace(xmlDepurado.attributes.tecnologia);
> >                                     descripcion_mc.cliente_txt.text =
> >this.infoCliente;
> >                                     descripcion_mc.actividad_txt.text =
> >this.infoActividad;
> >                                     descripcion_mc.breafing_txt.text =
> >this.infoBreafing;
> >                                     descripcion_mc.tecnologia_txt.text =
> >this.infoTecnologia;
> >                             };
> >                             if (i%3 == 0) {
> >                                     posX = 0;
> >                                     posY += 55;
> >                             } else {
> >                                     posX += 50;
> >                             }
> >                             clip_mc._x = posX;
> >                             clip_mc._y = posY;
> >                     }
> >             };
> >             cargaSeccion.onRollOver = function() {
> >                     var tintaTexto:Color = new
> >Color(this.textoBoton_mc);
> >                     tintaTexto.setRGB(posicionOver);
> >                     this.banda_mc.onEnterFrame = function() {
> >                             this._height += (36-this._height)/8;
> >                             if (Math.round(this._height) == 100) {
> >                                     this.onEnterFrame = null;
> >                             }
> >                     };
> >             };
> >             cargaSeccion.onRollOut = function() {
> >                     var tintaTextodos:Color = new
> >Color(this.textoBoton_mc);
> >                     tintaTextodos.setRGB(posicionOut);
> >                     this.banda_mc.onEnterFrame = function() {
> >                             this._height += (4-this._height)/8;
> >                             if (Math.round(this._height) == 3) {
> >                                     this.onEnterFrame = null;
> >                             }
> >                     };
> >             };
> >     }
> >}
> >
> >Este es el código del XML:
> >
> ><imagenes>
> >     <imagen>
> >             <foto miniatura="xml/imagen/miniatura/mini_01.jpg"
> >grande="xml/imagen/gr_01.jpg" cliente="Grupo Pinar"
> >actividad="Inmobiliaria"
> >
> >breafing="Lorem Ipsum is simply dummy text of the printing and 
>typesetting
> >industry. Lorem Ipsum" tecnologia="Freehand 11,Photoshop Cs"/> </imagen>
> ></imagenes>
> >
> >_________________________________________________________________
> >Descubre la descarga digital con MSN Music. Más de un millón de 
>canciones.
> >http://music.msn.es/
> >
> >
> >-----------------------------------------------------
> >ASNativos
> >www.5dms.com
> >subscripciones/desubscripciones
> >http://asnativos.5dms.com
> >-----------------------------------------------------
> >
> >
> >-----------------------------------------------------
> >ASNativos
> >www.5dms.com
> >subscripciones/desubscripciones
> >http://asnativos.5dms.com
> >-----------------------------------------------------
>
>_________________________________________________________________
>Moda para esta temporada. Ponte al día de todas las tendencias.
>http://www.msn.es/Mujer/moda/default.asp
>
>
>-----------------------------------------------------
>ASNativos
>www.5dms.com
>subscripciones/desubscripciones
>http://asnativos.5dms.com
>-----------------------------------------------------

_________________________________________________________________
Un amor, una aventura, compañía para un viaje. Regístrate gratis en MSN Amor

& Amistad. http://match.msn.es/match/mt.cfm?pg=channel&tcid=162349


-----------------------------------------------------
ASNativos
www.5dms.com
subscripciones/desubscripciones
http://asnativos.5dms.com
-----------------------------------------------------


-----------------------------------------------------
ASNativos
www.5dms.com
subscripciones/desubscripciones
http://asnativos.5dms.com
-----------------------------------------------------

Responder a