# Parent error

**URL:** <https://forum.kirupa.com/t/parent-error/300466>\
**Category:** Uncategorized\
**Created:** [November 21, 2009, 3:26pm UTC](https://forum.kirupa.com/t/parent-error/300466 "2009-11-21T15:26:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lope](https://avatars.discourse-cdn.com/v4/letter/l/43a26b/32.png) [@lope](https://forum.kirupa.com/u/lope)\
**Post date:** [November 21, 2009, 3:26pm UTC](https://forum.kirupa.com/t/parent-error/300466/1 "2009-11-21T15:26:02Z")

</div>

im one of my classes i am trying to call a method from its parent class, but i am getting an error:

```auto

if(parent){
parent.deactivatePanels();
}

1061: Call to a possibly undefined method deactivatePanels through a reference with static type flash.display:DisplayObjectContainer.

```

nevermind, i got it:

(parent as myClassName).deactivatePanels();
