# Custom button extends Sprite

**URL:** <https://forum.kirupa.com/t/custom-button-extends-sprite/281931>\
**Category:** Uncategorized\
**Created:** [February 15, 2009, 3:53pm UTC](https://forum.kirupa.com/t/custom-button-extends-sprite/281931 "2009-02-15T15:53:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![umala](https://avatars.discourse-cdn.com/v4/letter/u/c2a13f/32.png) [@umala](https://forum.kirupa.com/u/umala)\
**Post date:** [February 15, 2009, 3:53pm UTC](https://forum.kirupa.com/t/custom-button-extends-sprite/281931/1 "2009-02-15T15:53:55Z")

</div>

I am writing a class button that extends Sprite. I use graphic fill to draw button and then use addEventListener to add Tween to MouseOver event. Problem is:

1. If I use MOUSE\_OVER event, the tween became sometimes corrupt when Mouse is INSIDE the button.  
2)If I use ROLL\_Over event, the tween became sometimes corrupt when Mouse is NEAR the button BUT ok WHEN mouse is far enough.

I remember time when we use INVISIBLE button to capture mouse event probably. Is there any issus with mouse event in AS3 that I as a newbie do not know. Thanks
