# Accessing parent properties / casting

**URL:** <https://forum.kirupa.com/t/accessing-parent-properties-casting/258715>\
**Category:** flash\
**Created:** [April 27, 2008, 9:14am UTC](https://forum.kirupa.com/t/accessing-parent-properties-casting/258715 "2008-04-27T09:14:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kitsunegari](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kitsunegari](https://forum.kirupa.com/u/kitsunegari)\
**Post date:** [April 27, 2008, 9:14am UTC](https://forum.kirupa.com/t/accessing-parent-properties-casting/258715/1 "2008-04-27T09:14:38Z")

</div>

Hi

I have a problem with accessing the properties of a parent movieclip in AS3

I have 2 movieclips on my scene: clip1 and clip2

I have some actionscript inside clip2 that I would like to use to access some properties of clip1

So I tried this code:

```auto
trace((this.parent.parent as MovieClip).clip1.y);

```

but I get the following error:  
**Access of possibly undefined property some through a reference with static type flash.display:DisplayObjectContainer.**

It seems to me the path I use to get the properties of clip1 is correct, isn’t it?

Thanks in advance for your help
