- [Embed(source="pause.gif")]
- private var Button_PauseImg: Class;
- var pausebtn: SimpleButton = new SimpleButton();
- var pausebtnHitState: Sprite = new Sprite();
- pausebtnHitState.addChild(new Button_PauseImg());
- pausebtn.upState = pausebtn.downState = pausebtn.overState = pausebtn.hitTestState = pausebtnHitState;
- pausebtn.addEventListener(MouseEvent.CLICK, pauseClick);
转自:http://kingapex.iteye.com/blog/361087