package
{
import flash.display.Sprite;
import com.*;
import flash.text.TextField;
import flash.events.MouseEvent;
public class Chk extends Sprite
{
private var ba:Ball;
private var txt:TextField;
public function Chk():void
{
ba= new Ball(50, 0xf0fff00, 1);
txt = new TextField();
txt.text = "HI";
ba.addChild(txt);
addChild(ba);
ba.buttonMode = true;
ba.mouseChildren = false;
ba.x = stage.stageWidth/2;
ba.y = stage.stageWidth/2;
ba.addEventListener(MouseEvent.CLICK, action);
}
private function action(e:MouseEvent):void
{
trace("clicked");
}
}
}
.......