"var num" o me hace ver el error la verdad le echo cabeza y no lo encuentro
package {
import flash.events.MouseEvent;
import flash.display.Sprite;
public class bot extends Sprite {
public var b_1:boton_1 = new boton_1();
public var b_2:boton_2 = new boton_2();
public var b_3:boton_3 = new boton_3();
public function bot():void {
for (var i:uint = 1; i <= 3; i++) {
this["b_"+i].x = i*200;
addChild(this["b_"+i]);
this["b_" + i].addEventListener(MouseEvent.CLICK,clicBoton);
}
function clicBoton(e:MouseEvent) {
var nombre:String = e.currentTarget.name;
var num:uint = uint(nombre.replace("b_", "")); trace("Soy el botón " + num);
}
}
}
}
este es el codigo de la linea de tiempo principal:
var b:bot = new bot();
addChild(b);