Preloader Troubleshooting - Flash 6 to 7

Hello,

This preloader script works fine in Flash Player 6 but has some problems when exported for 7. Was wondering if someone could take a look. Any thoughts on simplificatin would be appreciated as well.


_root.createEmptyMovieClip("preloader", 100);
_global.pl = _root.preloader;
function doPreload(mc) {
	if (mc.thisLoaded != true) {
		Bl = mc.getBytesLoaded();
		Bt = mc.getBytesTotal();
		mc.percentDone = (isNan(Bl/Bt)) ? 0 : Math.round((Bl/Bt)*100);
		plFld.text = mc.percentDone+pl.loadedTxt;
		_global.plB._xscale = mc.percentDone;
		if (Bl == Bt && Bt>8) {
			clearInterval(_root.pl_int);
			_root.preloader.removeMovieClip();
			mc.thisLoaded = true;
			_root.doWhenLoaded(mc);
		}
		updateAfterEvent();
	}
}
// -------------------------------------------------------------
function doWhenLoaded(mc) {
	mc.gotoAndStop("init");
}
//| syntax:
//| preload(preloader._x, preloader._y, progressBar color, status text color);
//| or
//| preload();
MovieClip.prototype.preload = function(X, Y, W, H, Boffset, Bcol, Tcol) {
	_root.preloader.removeMovieClip;
	_root.createEmptyMovieClip("preloader", 100);
	// setting defaults when unspecified
	pl.loadedTxt = "% Loaded";
	W = (W == undefined) ? 170 : W;
	H = (H == undefined) ? 16 : H;
	X = (X == undefined || X == "center") ? Stage.width/2-W/2 : X;
	Y = (Y == undefined || Y == "center") ? Stage.height/2-H/2 : Y;
	Boffset = (Boffset == undefined) ? 3 : Boffset;
	Bcol = (Bcol == undefined) ? 0xD1D1D1 : Bcol;
	Tcol = (Tcol == undefined) ? 0x333333 : Tcol;
	// end setting defaults
	pl._x = X;
	pl._y = Y;
	// create the background for progressBar
	pl.beginFill(Bcol, 52);
	pl.moveTo(-Boffset, -Boffset);
	pl.lineTo(W+Boffset, -Boffset);
	pl.lineTo(W+Boffset, H+Boffset);
	pl.lineTo(-Boffset, H+Boffset);
	pl.lineTo(-Boffset, -Boffset);
	pl.endFill();
	//| setup the progress bar
	pl.createEmptyMovieClip("progressBar", 1);
	_global.plB = pl.progressBar;
	plB.beginFill(Bcol, 92);
	plB.moveTo(0, 0);
	plB.lineTo(W, 0);
	plB.lineTo(W, H);
	plB.lineTo(0, H);
	plB.lineTo(0, 0);
	plB.endFill();
	plB._xscale = 1;
	//|setup the load status textFormat
	_global.plFt = new textFormat();
	plFt.font = "Verdana, Helvetica, Arial, _sans";
	plFt.size = 9;
	//|setup the load status textField
	pl.createTextField("loadStatus_txt", 2, 0, 14-Boffset, 100, 100);
	_global.plFld = _level0.preloader.loadStatus_txt;
	plFld.setNewTextFormat(plFt);
	plFld.autoSize = true;
	plFld.background = false;
	plFld.selectable = false;
	plFld.border = false;
	plFld.textColor = Tcol;
	plFld.text = "0"+pl.loadedTxt;
	plFld._y -= (plFld.textHeight);
	_root.pl_int = setInterval(doPreload, 1, this);
};
// -------------------------------------------------------------
// preload this movie
stop();
// specify
// preload(this._x+10, this._y+10, 200, 2, 2, 0x990000, 0x990000);
// preload(undefined, undefined, 170, 16, 0, 0xDCDCDC, 0xFFFFFF);
// or
preload();
// -------------------------------------------------------------
Stage.scaleMode = "noscale";