# Overcasted superclass method not triggering subclass' method

**URL:** <https://forum.kirupa.com/t/overcasted-superclass-method-not-triggering-subclass-method/318856>\
**Category:** flash\
**Created:** [February 1, 2011, 3:13pm UTC](https://forum.kirupa.com/t/overcasted-superclass-method-not-triggering-subclass-method/318856 "2011-02-01T15:13:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geki](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Geki](https://forum.kirupa.com/u/Geki)\
**Post date:** [February 1, 2011, 3:13pm UTC](https://forum.kirupa.com/t/overcasted-superclass-method-not-triggering-subclass-method/318856/1 "2011-02-01T15:13:30Z")

</div>

Ok,

Say I have a class called Animal that has a method foo() and I call it out within the Animal class.

```auto
protected function foo():void
{
    trace("Animal");
}

```

I also have a class called Cat that extends Animal and overrides the method foo()

```auto
override protected function foo():void
{
     trace("Cat");
}

```

However when calling the function foo() from the superclass it traces out Animal not Cat (using a Cat object).  
How can I make superclass call out methods in the subclass?
