# Unknown child calling father

**URL:** https://forum.kirupa.com/t/unknown-child-calling-father/327042
**Category:** flash
**Created:** [February 2, 2012, 10:12am UTC](https://forum.kirupa.com/t/unknown-child-calling-father/327042 "2012-02-02T10:12:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![GiGaGiG](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@GiGaGiG](https://forum.kirupa.com/u/GiGaGiG)
#### Post date: [February 2, 2012, 10:12am UTC](https://forum.kirupa.com/t/unknown-child-calling-father/327042/1 "2012-02-02T10:12:37Z")

</div>

Hi, I have an absurd problem here:

I have class A and a child instance of class B: B calls a function of parent class A, and if I try to simply trace B from here (from inside the function in A) I get a null!

If I pass B as a parameter to the function in A and trace it is correctly show the class type, but tracing the B instance directly gives me a null, how can this happen?

```auto
class A Main()

gameElements = new GameElements(this);

function whatever (ga: *){
   trace(gameElements); //-----> null
   trace(ga); //-----> gameElements
}

------------------------------------------------------

class B GameElements(parentMC);

parentMC.whatever(this);

```

It looks like gameElements commits suicide as soon as I enter function “whatever”!

Any suggestion?
