Eso es lo que necesitaba saber, no te hace falta hacer un movieClip con estados si tu boton es un texto que cambia de color o filtros, aquí tienes un ejemplo genérico, pégalo en el primer frame de un documento nuevo, deberás ajustarlo a lo que quieres:
Código ActionScript :
import flash.filters.GlowFilter;
//---Nombres a insertar en los botones
var nombres:Array = new Array("Sección 1", "Sección 2", "Sección 3");
//---Variables
var boton:MovieClip;
var fondo:MovieClip;
var texto:TextField;
var estilo:TextFormat = new TextFormat();
var ancho:Number;
var alto:Number;
var posY:Number = 0;
with(estilo){
font = "Arial";
size = 12;
color = 0x666666;
}
//---Ciclo de crear los botones y darle acciones
for(var i:Number = 0; i < nombres.length; i++){
boton = this.createEmptyMovieClip("boton" + i, this.getNextHighestDepth());
fondo = boton.createEmptyMovieClip("fondo", boton.getNextHighestDepth());
texto = boton.createTextField("texto", boton.getNextHighestDepth(), 0, 0, 0, 0);
//---Crear el texto
with(texto){
autoSize = true;
selectable = false;
text = nombres[i];
setTextFormat(estilo);
}
//---Dibujar el fondo depende de las medidas del texto
ancho = texto._width;
alto = texto._height;
with(fondo){
beginFill(0x000000, 0);
moveTo(-2, -2);
lineTo(ancho + 4, -2);
lineTo(ancho + 4, alto + 4);
lineTo(0, alto + 4);
lineTo(0, 0);
endFill();
}
//---Situar los botones
boton._y = posY;
posY += boton._height + 20;
//---Acción de los botones
boton.onRollOver = function():Void{
var glow:GlowFilter = new GlowFilter(0x000000, 100, 3, 3, 1, 10);
var filterArray:Array = new Array();
filterArray.push(glow);
this.texto.filters = filterArray;
}
boton.onRollOut = function():Void{
this.texto.filters = [];
}
boton.onPress = function():Void{
this.texto.filters = [];
this.texto.textColor = "0xFF0000";
}
boton.onRelease = function():Void{
this.texto.filters = [];
this.texto.textColor = "0x666666";
}
boton.onReleaseOutside = function():Void{
this.texto.filters = [];
this.texto.textColor = "0x666666";
}
}