当前位置: 首页 > 工具软件 > SimpleButton > 使用案例 >

AS实现带图像的SimpleButton

阎枫涟
2023-12-01
  1. [Embed(source="pause.gif")]
  2. private var Button_PauseImg: Class;
  3. var pausebtn: SimpleButton = new SimpleButton();
  4. var pausebtnHitState: Sprite = new Sprite();
  5. pausebtnHitState.addChild(new Button_PauseImg());
  6. pausebtn.upState = pausebtn.downState = pausebtn.overState = pausebtn.hitTestState = pausebtnHitState;
  7. pausebtn.addEventListener(MouseEvent.CLICK, pauseClick);

转自:http://kingapex.iteye.com/blog/361087

 类似资料: