# Getting an object's parent

**URL:** <https://forum.kirupa.com/t/getting-an-objects-parent/241735>\
**Category:** flash\
**Created:** [October 17, 2007, 2:30pm UTC](https://forum.kirupa.com/t/getting-an-objects-parent/241735 "2007-10-17T14:30:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mistykal](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Mistykal](https://forum.kirupa.com/u/Mistykal)\
**Post date:** [October 17, 2007, 2:30pm UTC](https://forum.kirupa.com/t/getting-an-objects-parent/241735/1 "2007-10-17T14:30:50Z")

</div>

I’ve made a class that extends the TextInput object and when I create a new instance of it, I would like to be able to call a function in it’s parent container (another class that extends MovieClip).

I don’t know what I am doing wrong, but trace(this.parent) returns “null”.  
Is it possible to determine the parent movieclip in which the textinput resides?

Thanks in advance.

Shortened code example:

```auto

// parent
public class FieldRow extends MovieClip {
  public function FieldRow() {
    // i create an instance of my custom TextInput class
    var field:fTextShort = new fTextShort();
    addChild(field);
 }
}

// child
public class fTextShort extends TextInput {
   public function fTextShort() {
     trace(this.parent); // returns null
   }
}

```
