Why cant I access properties?

so Im having an issue, I have a movieclip in the library with the linkage name:BackgroundClip, so in the constructor I create it, add it to the display list and can even access and modify its properties, which I tested with the x position. Now what im having issues with is getting the stage resize listener to adjust the BackgroundClip instance, bg, to the stages width and height. In the clip is an image, so if someone has a better way of using classes to create full screen liquid gui im all ears!

package com.jhannis {

import flash.display.MovieClip;
import flash.display.Sprite;
import flash.display.StageScaleMode;
import flash.display.StageAlign;
import flash.display.Stage;
import flash.events.Event;


public class mainInit extends MovieClip {
    
    public function mainInit() {
        
        stage.addEventListener(Event.RESIZE, onResize);
        stage.scaleMode = StageScaleMode.NO_SCALE;
        var bgClip:BackgroundClip = new BackgroundClip;
        createBackground();
        addChild(bgClip);
        bgClip.x = 50;
    }
    
    public function createBackground():void {

/* bgClip.width = stage.stageWidth;
bgClip.height = stage.stageWidth;*/

    }
    
    public function onResize (event:Event):void {
        
    // Get the new stage size
      var sw:Number = stage.stageWidth;
      var sh:Number = stage.stageHeight;
      // Then update the children with this new size
      //bgClip.width = sw;
      //bgClip.height = sh;
      
    }
}

}