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.
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');
}
}
}