addChild from custom class

I’m trying to write a custom class that will take a progress bar movieclip from the library, add it to the stage, update it with information from my loader event listener, and then remove it from the stage when everything is loaded. I’ve been messing around with it for so long, and i just can’t get it to work!

i call the constructor from a frame action, like this:

var progBar:loaderBar = new loaderBar(100, 200);

and the class file:

public class loaderBar extends MovieClip {
		public function loaderBar(xloc:Number, yloc:Number) {
			stage.addChild(this);
			this.x = xloc;
			this.y = yloc;
			this.progressbar.progressbarmask.width = 0;
			this.loadStatus.text = "Loading";
			this.perc.text = "0%";
		}
		public function updateLoaderBar(statusMessage:String, bLoaded:Number, bTotal:Number) {
			this.perc.text=Math.ceil((bLoaded/bTotal)*100)+"%";
			this.loadStatus.text=statusMessage;
		}

am i going about this the wrong way? essentially, there’s only one progress bar active at any given time, so it always needs to be on top, and i guess it could theoretically always have the same instance name… so i might be able to add it directly to a layer in flash?