This is an older preloader that I usually use in my project because is very easy to use. You just have to copy and paste the preloader movieClip in your project and that’s all 😉

horizontal preloader

This is the code:

onClipEvent(Load){
	b_total = _root.getBytesTotal();
	this._x = 0;
	this._y = Stage.height/2;
}
onClipEvent(EnterFrame){
b_loaded = _root.getBytesLoaded();
if (b_loaded >= b_total) {
	//what to do after the content is loaded
	_root.gotoAndStop(2);
	}
	else{
		procent = b_loaded / b_total * 100;
		bara._width = (Stage.width/100) * procent;
		if(bara._width <= txt._width){
			txt._x = 0;
		}else{
			txt._x = bara._width - txt._width;
		}
		txt.text = Math.floor(procent) + "% LOADED";
	}
}

And you can download the source files from here.