Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/04/2008, 05:13
chefnelone
 
Fecha de Ingreso: diciembre-2005
Ubicación: Barcelona
Mensajes: 1.428
Antigüedad: 18 años, 4 meses
Puntos: 15
usar indexOF()

hola

necesito usar indexOf()

me funciona bien así:
var str:String = "The moon, the stars, the sea, the land";
trace(str.indexOf("the"));

pero si el texto sobre el cual hago la busqueda lo tomo de un xml de esta forma: (NO me funciona)

otraVar = this.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue; //otraVar toma el valor correcto del xml //
var str:String = otraVar;
trace(str.indexOf("the"));

//pero el indexOf no lo puede prosesar

alguna idea