# Migrating from AS2: problem importing package/class

**URL:** https://forum.kirupa.com/t/migrating-from-as2-problem-importing-package-class/230020
**Category:** flash
**Created:** [June 22, 2007, 1:42am UTC](https://forum.kirupa.com/t/migrating-from-as2-problem-importing-package-class/230020 "2007-06-22T01:42:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![arandomdan](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@arandomdan](https://forum.kirupa.com/u/arandomdan)
#### Post date: [June 22, 2007, 1:42am UTC](https://forum.kirupa.com/t/migrating-from-as2-problem-importing-package-class/230020/1 "2007-06-22T01:42:45Z")

</div>

I’m currently migrating a Flash game over to AS3 and I’m having trouble changing my classes into packages. I have a folder called “actionscript” which contains all my packages/classes, etc.

My main class file, “Main.as”, looks like this:

```auto

package actionscript
{
            // Flash packages
            import flash.media.Sound;
            ...
            import flash.events.KeyboardEvent;

            // My packages (found in same “actionscript” folder)
            import Inventory;
            ...
            import Level1;

            public class Main
            {
                        private var _currentLevel;
                        ...
                        private var _inventory;
   
                        /**
                        * Constructor
                        */
                        public function Main()
                        {
                        ...
                        }
            ...
            }
}

```

I have the following code on frame 1:

```auto

import actionscript.Main;
var Main:Main = new Main();

```

But I get this error:

“1046: Type was not found or was not a compile-time constant: Main.”

Any idea what’s going on?

Thanks!
