# Library symbol not recognised

**URL:** <https://forum.kirupa.com/t/library-symbol-not-recognised/302138>\
**Category:** Uncategorized\
**Created:** [December 22, 2009, 1:00pm UTC](https://forum.kirupa.com/t/library-symbol-not-recognised/302138 "2009-12-22T13:00:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lope](https://avatars.discourse-cdn.com/v4/letter/l/43a26b/32.png) [@lope](https://forum.kirupa.com/u/lope)\
**Post date:** [December 22, 2009, 1:00pm UTC](https://forum.kirupa.com/t/library-symbol-not-recognised/302138/1 "2009-12-22T13:00:20Z")

</div>

in my fla file i have 1 symbol in the library with the export name: “Box”  
my document class:

```auto
package {
    
    import flash.display.MovieClip;
    import flash.display.Stage;
    import flash.events.Event;
    
    import testFolder.TestObject;
    
     public class TestDoc extends MovieClip{
        
        private var obj:TestObject;
        
        public function TestDoc() {
            
            addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
        }
            
        private function init(e:Event):void {
            
            removeEventListener(Event.ADDED_TO_STAGE, init);
            
            obj = new TestObject();
            addChild(obj);
        
        }
    }
}

```

my other class: (notice the package)

```auto

package testFolder{
    
    import flash.display.MovieClip;
    import flash.events.Event;
    
    **import Box;**

     public class TestObject extends MovieClip{
        
        public function TestObject() {
            
            addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
        }
            
        private function init(e:Event):void {
            
            removeEventListener(Event.ADDED_TO_STAGE, init);
            
            var b:Box = new Box();
            addChild(b);
        
        }
    }
}

```

this works as it it, BUT if i try to load my document class into another swf and strong type it like so:

```auto

var loader:Loader = new Loader();
loader.addEventListener(Event.COMPLETE, onTestComplete);
function onTestComplete(e:Event):void {
    mainSprite.addChild(loader);
    var t:TestDoc = mainSprite.getChildAt(0) as TestDoc;
}

```

compiler complains:  
1046: Type was not found or was not a compile-time constant: Box.  
1180: Call to a possibly undefined method Box.  
1172: Definition Box could not be found.

whats the problem?
