# Wont let me import Class, error

**URL:** <https://forum.kirupa.com/t/wont-let-me-import-class-error/301925>\
**Category:** flash\
**Created:** [December 17, 2009, 9:28pm UTC](https://forum.kirupa.com/t/wont-let-me-import-class-error/301925 "2009-12-17T21:28:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maruf89](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@maruf89](https://forum.kirupa.com/u/maruf89)\
**Post date:** [December 17, 2009, 9:28pm UTC](https://forum.kirupa.com/t/wont-let-me-import-class-error/301925/1 "2009-12-17T21:28:52Z")

</div>

I’m using one of senoculars tutorials for duplicating graphics, it uses 2 as class files, and I get what the problem is I just don’t get why it doesn’t recognize it here’s the error: 1046: Type was not found or was not a compile-time constant: MyShape.

```auto
import com.shapes.MyShape;

var shape1:MyShape = new MyShape();
shape1.graphicsCopy.beginFill(0xFF80);
shape1.graphicsCopy.lineStyle(2, 0);
shape1.graphicsCopy.drawRect(0, 0, 50, 50);

// draw shape2 using shape1's copied drawing
var shape2:MyShape = new MyShape();
shape2.graphicsCopy.copy(shape1.graphicsCopy);

// add to display list
addChild(shape1);
addChild(shape2);
shape2.x += 100;

```

and here’s the MyShapes.as

```auto
package com.shapes {
    
    import flash.display.Shape;
    import com.shapes.GraphicsCopy;
    
    class MyShape extends Shape {
        
        // graphicsCopy property
        private var _graphicsCopy:GraphicsCopy;
        public function get graphicsCopy():GraphicsCopy {
            return _graphicsCopy;
        }
        
        // constructor
        function MyShape(){
            _graphicsCopy = new GraphicsCopy(graphics);
        }
    }
}

```
