# Accessing compile-time constants

**URL:** https://forum.kirupa.com/t/accessing-compile-time-constants/232300
**Category:** flash
**Created:** [July 12, 2007, 3:51pm UTC](https://forum.kirupa.com/t/accessing-compile-time-constants/232300 "2007-07-12T15:51:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![quackor](https://avatars.discourse-cdn.com/v4/letter/q/ac91a4/32.png) [@quackor](https://forum.kirupa.com/u/quackor)
#### Post date: [July 12, 2007, 3:51pm UTC](https://forum.kirupa.com/t/accessing-compile-time-constants/232300/1 "2007-07-12T15:51:27Z")

</div>

on the stage I have a movie clip that is tied to class Test, inside it I have another movie clip that I named “child”. Since under publish settings I have it checked to “Automatically declare stage instances” I was hoping to just access it… here’s my Test class:

```auto
package {
    import flash.display.MovieClip;
    
    public class Test extends MovieClip {
        
        public function Test() {
            this.addEventListener("load", movieLoaded);
        }
        
        public function movieLoaded() {
            child.visible = false;
        }
    }
}

```

And here’s my compiler error:  
1046: Type was not found or was not a compile-time constant: child.

I was looking through AS3 tips of the day, and a whole bunch of sites talking about this error, but found nothing similar to my situation…

How to access “stage instances” if they have been “automatically declared”?
