Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/12/2007, 16:58
Avatar de SinguerInc
SinguerInc
 
Fecha de Ingreso: octubre-2007
Ubicación: Barcelona, España
Mensajes: 551
Antigüedad: 16 años, 6 meses
Puntos: 5
Re: Problema con texto

supongamos que tienes un textField en el flash llamado "miTextField_tf" y un boton llamado "miBoton_btn", el codigo que necesitas es:

Código:
stop();
miTextField_tf.restrict = "0-9";
miBoton_btn.onPress = function()
{
	var frameNumber:Number;
	try
	{
		frameNumber = Number(miTextField_tf.text);
		if(frameNumber <= _totalframes)
			gotoAndStop(frameNumber);
		else
			throw new Error();
	}
	catch(e:Error)
	{
		trace("Alguien escribio un frame que no existe....");
	}
}
saludos.
Estoy desarrollando un nuevo juego "PanQueso", te gustaria verlo?, link en mi firma. Comentarios? En firefox a veces falla...
__________________
/blog.singuerinc.com