# Making a MC Class clickable

**URL:** https://forum.kirupa.com/t/making-a-mc-class-clickable/318525
**Category:** flash
**Created:** [January 22, 2011, 9:47pm UTC](https://forum.kirupa.com/t/making-a-mc-class-clickable/318525 "2011-01-22T21:47:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![arunforce](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@arunforce](https://forum.kirupa.com/u/arunforce)
#### Post date: [January 22, 2011, 9:47pm UTC](https://forum.kirupa.com/t/making-a-mc-class-clickable/318525/1 "2011-01-22T21:47:28Z")

</div>

In AS2 I could just do onRelease() inside the class, and all the movies would be clickable, if the class extended a MC.

This is my AS3 code, not sure why it won’t work. It’s like nearly impossible to Google, spent like the last two hours doing it. ☹

```auto

package
{
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    
    public class tower extends MovieClip
    {
        public function tower(x:int, y:int)
        {
            trace("DA " + x + " " + y);
            this.x = x;
            this.y = y;
        }
        
        
        tower.addEventListener(MouseEvent.CLICK, reloadListener);
        
        function reloadListener(event:MouseEvent) {
            trace('worked');
        }
    }  
}

```
