All pastes #907662 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-02-17 20:31 UTC
rendered paste body
// ESTE CODIGO VE EN LA ESCENA PRINCIPAL
botones= new Array("Inicio", "retratos", "pintura", "biografía", "contacto");
for (var i=0;i<5;i++){
	areas = attachMovie("box", "box"+i, this.getNextHighestDepth());
	areas._y = i*(box0._height+10);
	areas._x = 40;
	areas.texto.text=(botones[i]);
	areas.valor = i+2;

areas.onRelease=function(){
if(activo!=this){
	_parent.gotoAndStop(valor);
my_fmt.color = 0x000000;
	activo.texto.setTextFormat(my_fmt);
	
	my_fmt.color = 0xFF0000; 
	texto.setTextFormat(my_fmt);
activo = this;

}
}
areas.onRollOver=function(){
if(activo!=this){
	my_fmt.color = 0xFF0000;  
	texto.setTextFormat(my_fmt);
}
}
areas.onRollOut=function(){
if(activo!=this){
	my_fmt.color = 0x000000; 
	texto.setTextFormat(my_fmt);
}
	
}

}

var activo:MovieClip = botones[0];

//ESTE CODIGO VA DENTRO DE UN MOVIECLIP QUE SE LLAMA BOX Y QUE TIENE UN CAMPO DE TEXTO DENTRO CON LA INSTANCIA TEXTO
var my_fmt:TextFormat = new TextFormat(); 
	
onRelease=function(){
	_parent.gotoAndStop(valor);
	activo.enabled = true
	this.enabled = false;
	activo = this;
	my_fmt.color = 0xFF0000; 
	texto.setTextFormat(my_fmt);
}
onRollOver=function(){
	my_fmt.color = 0xFF0000;  
	texto.setTextFormat(my_fmt);
}
onRollOut=function(){
	my_fmt.color = 0x000000; 
	texto.setTextFormat(my_fmt);
	
}