class Button extends flash.display.SimpleButton {
public var onClick : Void -> Void;
public var onMouseOut : Void -> Void;
public function new ( graphic : String ) : Void {
onClick = doOnClick;
super ();
upState = new Image ("gfx_" + graphic + "_up");
downState = new Image ("gfx_" + graphic + "_down");
overState = new Image ("gfx_" + graphic + "_over");
hitTestState = overState;
}
public function setLabel (text : String) {
}
public function doOnClick () {
}
}
=============================================================
var foo:Button = new Button ('leftPaneItem');
addChild (foo);