Ver Mensaje Individual
  #4 (permalink)  
Antiguo 14/06/2003, 21:16
Avatar de TMeister
TMeister
Crazy Coder
 
Fecha de Ingreso: enero-2002
Ubicación: En la Oficina
Mensajes: 2.880
Antigüedad: 22 años, 3 meses
Puntos: 193
Que tal!!

No tenia nada que hacer asi que me puse a hacer esto!!
solo Copia y Pega en el Primer Frame y da Ctrl+Enter....

Aqui el Codigo:

Código:
//La Clase funciona asi:
//Identificador = new efecto(Texto, Duracion, color, tamaño);
//a = new efecto(entrada.text, 100, col.text, tama.text);
//Duracion es el Tiempo que tradara el efecto entre letra y letra
//en Milisegundos
//------------
//Clase que hace el Efecto de Tipeo
function efecto(texto, tiempo, ncolor, tamanio) {
	this.texto = texto;
	this.tiempo = tiempo;
	this.ncolor = ncolor;
	this.tamanio = tamanio;
	this.char = 1;
	this.interval = setInterval(this, "l", this.tiempo);
}
efecto.prototype.l = function() {
	f = new TextFormat();
	f.color = this.Ncolor;
	f.size = this.tamanio;
	createTextField("c", 1, 50, 70, 0, 0);
	c.setNewTextFormat(f);
	c.border = true;
	c.borderColor = 0xFFFFFF;
	c.autoSize = true;
	c.text = this.texto.substr(0, this.char);
	if (this.char<this.texto.length) {
		this.char++;
	} else {
		clearInterval(this.interval);
		return true;
	}
};
//--------
createTextField("entrada", 2, 50, 100, 150, 20);
entrada.type = "Input";
entrada.border = true;
entrada.text = "Texto a mostrar";
createTextField("tama", 3, 50, 130, 80, 20);
tama.type = "Input";
tama.border = true;
tama.text = "tamaño ej. 15";
createTextField("col", 4, 50, 160, 100, 20);
col.type = "Input";
col.border = true;
col.text = "color ej. 0xFF0000";
createEmptyMovieClip("envia", 5);
with (envia) {
	beginFill(0xCCCCCC);
	lineStyle(1);
	moveTo(50, 190);
	lineTo(50, 190);
	lineTo(100, 190);
	lineTo(100, 210);
	lineTo(50, 210);
	lineTo(50, 190);
	createTextField("label", 2, 50, 190, 0, 0);
	label.autoSize = true;
	label.text = "ver efecto";
}
envia.onPress = function() {
	a = new efecto(entrada.text, 100, col.text, tama.text);
};
Disfrutalo !!

Saludos!!

Última edición por TMeister; 14/06/2003 a las 21:20