# Mouse event and event target

**URL:** <https://forum.kirupa.com/t/mouse-event-and-event-target/300743>\
**Category:** Uncategorized\
**Created:** [November 26, 2009, 12:41pm UTC](https://forum.kirupa.com/t/mouse-event-and-event-target/300743 "2009-11-26T12:41:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![regbolD](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@regbolD](https://forum.kirupa.com/u/regbolD)\
**Post date:** [November 26, 2009, 12:41pm UTC](https://forum.kirupa.com/t/mouse-event-and-event-target/300743/1 "2009-11-26T12:41:51Z")

</div>

i have these 2 functions and both are the same:

as you can see **disabledAction** receives e.target as a paremeter from another function (click function actually).

is there a way to somehow call **disabledAction** from **rollOverHandler**?  
(so that the code doesnt repeat)

```auto
function disabledAction(target:MovieClip):void {

    var txt:TextField = Finder.findTextfield( target as MovieClip ) as TextField;
    if (txt) {
        txt.textColor = _rollOverColor;
    }
}

function rollOverHandler(e:MouseEvent):void {

    var txt:TextField = Finder.findTextfield( e.target as MovieClip ) as TextField;
    if (txt) {
        txt.textColor = _rollOverColor;
    }
}

```
