Hi guys, first time posting here.

I'm having an issue with the tutorial located at this address (The source code is at the bottom of the page).

Basically, the issue is this; when the character (mcMain) dies, either by falling or by enemy contact, the eFrame function located in the Coin class causes the following error:

Actionscript Code:
"TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at Coin/eFrame()"

The strange thing is that the function itself appears to work just fine; it still removes the coin items correctly and increments the score like its supposed to, but the error persists and worst of all it eventually causes Flash Pro to crash.

Here is the Coin class, the eFrame function is near the bottom.
Actionscript Code:
package{
    import flash.display.Sprite;
    import flash.display.MovieClip;
    import flash.display.Shape;
    import flash.display.DisplayObject;
    import flash.events.*;
    //sprites are just movieclips without any frames in them
    public class Coin extends Sprite{
        //_root will signify the root of the document
        private var _root:Object;
        //var newCoin:coinMc = new coinMc();
       
        public function Coin(){
            //this code will only be run once
            addEventListener(Event.ADDED, beginClass);
            //this code will constantly be run
            addEventListener(Event.ENTER_FRAME, eFrame);
           
        }
       
        private function beginClass(event:Event):void{
            //defining the root of the document
            _root = MovieClip(root);
            //making an invisible box that will help in placement
            this.graphics.beginFill(0x000000,0);
            this.graphics.drawRect(0,0,25,25);
            //then adding a shape within it that will show the coin
            //this.addChild(newCoin);
            this.graphics.beginFill(0xFFFF00,1);
            this.graphics.drawCircle(12.5,12.5,5);
           
        }
        public function eFrame(event:Event):void{
            //hit testing with the coin and the main guy
            //we'll use math for this!
                                   
            if(_root.mcMain.x <= this.x + _root.lvlHolder.x + 10
               && _root.mcMain.x >= this.x + _root.lvlHolder.x - 10
               && _root.mcMain.y <= this.y + 10
               && _root.mcMain.y >= this.y - 10)
            {
                this.parent.removeChild(this);
                removeEventListener(Event.ENTER_FRAME, eFrame);
                //then we update the score!
                _root.mainScore += 100;
                trace (_root.mcMain);
            }
           
           
        }
    }
}

When mcMain dies, the entire level is reset and built again. Now when the level is initially created, a number of holders are added as children to the level holder (including the coin class and a few others), and when the level is reset, the following code removes all of the level holder children and builds the level again.

Actionscript Code:
//resets the level
function resetLvl():void{
    for(var i:int=0;i<lvlHolder.numChildren;i++){
        //selecting the current container
        var currentContainer = lvlHolder.getChildAt(i);
        //and deleting all of it's contents
        while(currentContainer.numChildren > 0){
            for(var i2:int = 0;i2<currentContainer.numChildren;i2++){
              currentContainer.removeChildAt(i2);
            }
        }
    }
    //then we remake the lvl and reset the lvlHolder
   
    lvlHolder.x = 0;
    createLvl();
    //reset the score
    mainScore = 0;
}

I'm completely stumped. I have no idea how to fix this error. Can someone please help me before I tear out my hair!