# Adding to reusable class

**URL:** <https://forum.kirupa.com/t/adding-to-reusable-class/327172>\
**Category:** flash\
**Created:** [February 10, 2012, 3:04pm UTC](https://forum.kirupa.com/t/adding-to-reusable-class/327172 "2012-02-10T15:04:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Laborious](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@Lars\_Laborious](https://forum.kirupa.com/u/Lars_Laborious)\
**Post date:** [February 10, 2012, 3:04pm UTC](https://forum.kirupa.com/t/adding-to-reusable-class/327172/1 "2012-02-10T15:04:20Z")

</div>

Hi all, I have a question that should be easy to answer, but I somehow haven’t found an answer to yet.

I’ve been coding in AS3 for two years now but still carry with me old AS2 habits which might explain why I find it hard to reuse custom classes without having to rewrite them for each project.

Say I have a ClipDragger class where event listeners (MOUSE\_DOWN and MOUSE\_UP) are added to any MovieClip I choose, which fires methods that invoke startDrag and stopDrag. This is great whenever drag and drop is all I need, but say I want to add an action to the MOUSE\_DOWN function/method (for instance play an animation inside a movieclip) and add an extra event listener (MOUSE\_MOVE). How would I best accomplish this without writing a new custom class?
