//---copia el codigo de abajo y ponlo en un FLA nuevo

variable = "350"
trace ("asi sola la variable " +variable+ " es una: " +
typeof(variable));
variableNum = Number(variable);
trace ("si la cambiamos a numero con Number la variable " + variableNum
+ " se convierte en: " + typeof(variableNum));
trace ("probemos -------------");
trace("variable + variable= " +variable + variable )
trace("ahora ---------");
trace("variableNum + variableNum= " + (variableNum + variableNum));

//----final de copiado



Tu codigo seria algo asi:

<code>

function cargaXML() {
     var primerNivel = this.firstChild;
     var noticias = primerNivel.childNodes;
     var posicionY = 20;
     total = noticias.length;
     totalNum = Number(total)
     for (x in noticias) {
        :::::::::::
        :::::::::::
    }
}

</code>

o mas corto:

<code>

function cargaXML() {
     var primerNivel = this.firstChild;
     var noticias = primerNivel.childNodes;
     var posicionY = 20;
     total = Number(noticias.length)
     for (x in noticias) {
        :::::::::::
        :::::::::::
    }
}

</code>


adios


...helmut
   <HLS>

 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Luis Antonio Garc�a
Galache
Sent: Friday, January 23, 2004 6:53 PM
To: [EMAIL PROTECTED]
Subject: [ASNativos] convertir a n�mero 

Hola!

�Como puedo convertir a n�mero un dato (el n�mero de noticias) que me
llega de un XML????

<code>

function cargaXML() {
     var primerNivel = this.firstChild;
     var noticias = primerNivel.childNodes;
     var posicionY = 20;
     total = noticias.length;
     for (x in noticias) {
        :::::::::::
        :::::::::::
    }
}

</code>




<!-------------------------------
Lista ASNativos:
subscripciones/desubscripciones
http://www.sidedev.net/asnativos
-------------------------------->

Responder a