# Import a class that's in a package into another class? :/

**URL:** <https://forum.kirupa.com/t/import-a-class-thats-in-a-package-into-another-class/310767>\
**Category:** flash\
**Created:** [June 18, 2010, 3:43pm UTC](https://forum.kirupa.com/t/import-a-class-thats-in-a-package-into-another-class/310767 "2010-06-18T15:43:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bitShifter\_](https://avatars.discourse-cdn.com/v4/letter/b/e99b99/32.png) [@bitShifter\_](https://forum.kirupa.com/u/bitShifter_)\
**Post date:** [June 18, 2010, 3:43pm UTC](https://forum.kirupa.com/t/import-a-class-thats-in-a-package-into-another-class/310767/1 "2010-06-18T15:43:22Z")

</div>

So basically i have my root folder with my fla and my document class in it,  
then I have a folder called ‘main’ with another class in it (Control)

But I can’t seem to import my main.Control into my document class… (I would like to create an instance)

```auto

package{
    import flash.display.*
    import main.Control//is this wrong?
    public class init extends MovieClip{
        public function init(){
            new Control(stage);
        }
    }
}

```

also, this is the Control class’s definition:

```auto
package main{
    import flash.display.*
    import flash.events.*
    
    public class Control extends MovieClip{
        
        function Control(stage){
            var menu=new Menu(stage);
            addChild(menu);
        }
    }
}

```

This should be simple right? I’m guessing the import statement is wrong…
