# Learning OOP?

**URL:** https://forum.kirupa.com/t/learning-oop/304099
**Category:** Uncategorized
**Created:** [February 1, 2010, 7:44pm UTC](https://forum.kirupa.com/t/learning-oop/304099 "2010-02-01T19:44:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Navarone](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@Navarone](https://forum.kirupa.com/u/Navarone)
#### Post date: [February 1, 2010, 7:44pm UTC](https://forum.kirupa.com/t/learning-oop/304099/1 "2010-02-01T19:44:13Z")

</div>

I am learning OOP and have a question. On my stage I added a dynamic text field with instance name “test”. In my class I have the following:

```auto

package {
    import flash.display.MovieClip;
    public class Main extends MovieClip {
        public function Main() {
            trace("Flash");
            test.text = "Flash";
        }
    }
}

```

I get an output error 1046: Type was not found or was not a compile-time constant: TextField.

What am I doing wrong here?
