# Accessing a parent's function

**URL:** <https://forum.kirupa.com/t/accessing-a-parents-function/239943>\
**Category:** Uncategorized\
**Created:** [September 27, 2007, 2:24pm UTC](https://forum.kirupa.com/t/accessing-a-parents-function/239943 "2007-09-27T14:24:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maqrkk](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@Maqrkk](https://forum.kirupa.com/u/Maqrkk)\
**Post date:** [September 27, 2007, 2:24pm UTC](https://forum.kirupa.com/t/accessing-a-parents-function/239943/1 "2007-09-27T14:24:09Z")

</div>

Hello,

I’m creating a platform game. I have the Document Class GameControl, which makes the map and the players, and ‘treasures’ and jumpers. I have a Guy class which moves the Guy around the stage and checks for collisions. I want to open a door, when I catch a certain treasure. I want the Guy class to call the GameControl class’ function remove, which removes the door. However,

```auto
GameControl.remove();

```

gives me the next error:

```auto
1061: Call to a possibly undefined method remove through a reference with static type Class.

```

I’m clueless as how to solve this, can anyone give me any hints/tips? Thanks in advance.

Maqrkk
