# Hard times with packages

**URL:** <https://forum.kirupa.com/t/hard-times-with-packages/234135>\
**Category:** Uncategorized\
**Created:** [July 30, 2007, 8:52pm UTC](https://forum.kirupa.com/t/hard-times-with-packages/234135 "2007-07-30T20:52:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GrndMasterFlash](https://avatars.discourse-cdn.com/v4/letter/g/71c47a/32.png) [@GrndMasterFlash](https://forum.kirupa.com/u/GrndMasterFlash)\
**Post date:** [July 30, 2007, 8:52pm UTC](https://forum.kirupa.com/t/hard-times-with-packages/234135/1 "2007-07-30T20:52:32Z")

</div>

i have not had to hard of a time getting used to the new syntax of AS3, however i cannot figure out packages, i sniped this enter frame script that is defined in a package, but when ever i publish it it gives an error report

THE CODE  
package {  
import flash.display._;  
import flash.events._;

```
public class TestEnterFrame extends Sprite {
    public function TestEnterFrame() {
        addEventListener(Event.ENTER_FRAME, onEnterFrame);
    }

    private function onEnterFrame(ev:Event):void {
        trace("onenterframe:"+ev);
    }
}

```

}

THE ERROR  
1037: Packages cannot be nested.
