# Event Handler

**URL:** <https://forum.kirupa.com/t/event-handler/326825>\
**Category:** flash\
**Created:** [January 15, 2012, 2:20am UTC](https://forum.kirupa.com/t/event-handler/326825 "2012-01-15T02:20:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DSlish](https://avatars.discourse-cdn.com/v4/letter/d/ac91a4/32.png) [@DSlish](https://forum.kirupa.com/u/DSlish)\
**Post date:** [January 15, 2012, 2:20am UTC](https://forum.kirupa.com/t/event-handler/326825/1 "2012-01-15T02:20:30Z")

</div>

I added this code to make a movie clip (gFP) pop up when rolled over and shrink back when rolled off:

gFP.addEventListener (MouseEvent.MOUSE\_OVER, goToGFPOver);

private function goToGFPOver(e:MouseEvent):void  
{  
gFP.scaleX = 1.4;  
gFP.scaleY = 1.4;  
gFP.parent.setChildIndex(gFP, gFP.parent.numChildren - 1);  
gFP.addEventListener (MouseEvent.MOUSE\_OUT, goToGFPOut);  
}

private function goToGFPOut(e:MouseEvent):void  
{  
gFP.scaleX = 1;  
gFP.scaleY = 1;  
gFP.removeEventListener(MouseEvent.MOUSE\_OUT, goToGFPOut);  
}

It works, but I have 45 movie clips I want to add this to - way too much code. Is there a way to have the event listeners for all the movie clips go to the same “Over” and “Out” functions?
