# Accessing properties through 'root'

**URL:** https://forum.kirupa.com/t/accessing-properties-through-root/227709
**Category:** Uncategorized
**Created:** [June 1, 2007, 12:44pm UTC](https://forum.kirupa.com/t/accessing-properties-through-root/227709 "2007-06-01T12:44:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![TastyLamp](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@TastyLamp](https://forum.kirupa.com/u/TastyLamp)
#### Post date: [June 1, 2007, 12:44pm UTC](https://forum.kirupa.com/t/accessing-properties-through-root/227709/1 "2007-06-01T12:44:44Z")

</div>

Within a class that represents ‘slide.panel’, and is added to the display list, I have code that tries to access a public variable I set in the document class, like so:

```auto
root.satellites.push(sat);

```

‘satellites’ is the public variable, of course.

Flash throws the error; 1119: Access of possibly undefined property satellites through a reference with static type flash.display:DisplayObject.

I got around this problem by making the public variables static and using ‘Main.satellites’ (Main being the document class) instead of ‘root.satellites’ - but I would still like to know what I am doing wrong, if anything? Thanks for any help.
