# Unable to access non-main classes in a package

**URL:** https://forum.kirupa.com/t/unable-to-access-non-main-classes-in-a-package/243633
**Category:** Uncategorized
**Created:** [November 9, 2007, 2:00am UTC](https://forum.kirupa.com/t/unable-to-access-non-main-classes-in-a-package/243633 "2007-11-09T02:00:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Lazer57](https://avatars.discourse-cdn.com/v4/letter/l/96bed5/32.png) [@Lazer57](https://forum.kirupa.com/u/Lazer57)
#### Post date: [November 9, 2007, 2:00am UTC](https://forum.kirupa.com/t/unable-to-access-non-main-classes-in-a-package/243633/1 "2007-11-09T02:00:49Z")

</div>

i am a newbie to AS3. i have some vid tutorials and a book. i am doing ok with AS3 on the timeline, but using classes is killing me. i have read through many other threads and have tried adapting the tips to my special circumstance but it isn’t working. it has been over a week of now and again tweaking my approach and i can’t get it to work. here is the setup.

files:  
Geometry-RectangleArea.fla (in root)  
Lesson.as (in root/lesson)  
MoveMC.as (in root/lesson)(i just used this to try to duplicate a solution in another thread)

the document class for the .fla is lesson.Lesson

i put in a simple trace into the main class (Lesson.as) which does output. i am currently trying to move a MC object on frame 196, just so that i can know that non-main classes can work properly. here is the code:

on frame 196 of main timeline:  
stop();  
var mmc:MoveMC = new MoveMC(area4ftsq);

inside the Lesson.as file:

```auto
 
package lesson
{
 import flash.net.*;
 import flash.media.*;
 import flash.display.MovieClip;
 import flash.events.*;
 import flash.display.SimpleButton;
 
 public class Lesson extends MovieClip
 {
  public function Lesson():void
  {
   trace("hello dude");
  }
 }
}

```

inside MoveMC.as file:

```auto
 
package lesson
{
 import flash.display.MovieClip;
    
    internal class MoveMC extends MovieClip
    {
        public function MoveMC(area4ftsq:MovieClip)
        {
            area4ftsq.x -= 150;
        }
    }
}

```

the error i get:  
1046: Type was not found or was not a compile-time constant: MoveMC.

would appreciate your help and patience.
