Foros del Web » Creando para Internet » Flash y Actionscript »

usar indexOF()

Estas en el tema de usar indexOF() en el foro de Flash y Actionscript en Foros del Web. 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 ...
  #1 (permalink)  
Antiguo 08/04/2008, 05:13
 
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
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 03:53.