public class Main extends Sprite
{
public function Main():void
{
init();
}
private function init():void
{
var a:Sprite = new Sprite(); //按鈕抬起時顯示狀態
huitu(a,0x00ff00);
var b:Sprite = new Sprite(); //放到按鈕上顯示狀態
huitu(b,0xff0000);
var c:Sprite = new Sprite(); //按下按鈕顯示狀態
huitu(c,0x0000ff);
//建立按鈕對象
var abc:SimpleButton = new SimpleButton(a,b,c,c);
abc.x = abc.y = 50;
this.addChild(abc);