Tema: Combo AS3
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/02/2008, 08:17
tyrula
 
Fecha de Ingreso: mayo-2005
Ubicación: Castellón
Mensajes: 321
Antigüedad: 19 años
Puntos: 0
Pregunta Combo AS3

Hola a todos, tengo un código hecho en AS2 para rellenarme un combo, mi problema es que ahora quiero "convertir" esto a AS3 y el único error que me sale es este:


TypeError: Error #1006: value no es una función.
at nombres_cs3_fla::MainTimeline/frame1()


El código es este:

//System.useCodepage=true;
var nombres_xml = new XML();
nombres_xml.ignoreWhite = 1;
nombres_xml.load("nombres.xml");
nombres_xml.onLoad = function() {
var nombre;
for (var i = 0; i<this.firstChild.childNodes.length; i++) {
if (this.firstChild.childNodes[i].nodeName != null) {
nombre = this.firstChild.childNodes[i].firstChild.nodeValue;
cb_nombres.addItem(nombre);
}
}
};
nombres_xml.ignoreWhite = 1;


alguien me puede ayudar??

Por cierto el System.useCodepage ya no va en AS3????

Gracias!!

El xml que tengo es este:


<?xml version='1.0' encoding='iso-8859-1'?>
<database>
<nombre>Javier</nombre>
<nombre>Jose</nombre>
<nombre>Silvia</nombre>
<nombre>Mónica</nombre>
<nombre>Manuel</nombre>
<nombre>Sara</nombre>
<nombre>Ana</nombre>
</database>

Última edición por tyrula; 26/02/2008 a las 08:41