Preloader in a class?

Hi there people!
It seems i moved myself to as3 ehehe.
I was trying to build my own framework, for personal use solo.
My first tryout was to make a Preloader class, let’s call it that.

Well but i’m having problems.
First the code.
At the fla I have the preloader inside of it progressbar and basebar.
On the first action of the fla i have:

//position and rotation of the preloader
var preposx:Number=stage.stageWidth/2 - preloader.width/2;
var preposy:Number=stage.stageHeight/2 - preloader.height/2;

preloaderRotation(0);
preloaderPosition(preposx, preposy);

//image load
function iniciarApp():void {
addChild(imageLoader);
}

var imageLoader:Loader;

function loadImage(url:String):void {
imageLoader = new Loader();
imageLoader.load(new URLRequest(url));
}
//call functions
loadImage(“pixelHouses.jpg”);
eventosPreloader();

And here goes my .as :
package {
public class preloaderHorizontal {
public function SetProgress(ProgValPrel:Number) {
preloader.progressbar.width=ProgValPrel*preloader.basebar.width;
}
public function preloaderPosition(PrelPosX:Number, PrelPosY:Number) {
preloader.x=PrelPosX;
preloader.y=PrelPosY;
}
public function preloaderRotation(value:Number) {
preloader.rotation=value;
}
public function prelLoading(e:ProgressEvent) {
var loaded:Number=e.bytesLoaded/e.bytesTotal;
SetProgress(loaded);
}
public function prelLoaded(event:Event) {
preloader.visible=false;
iniciarApp();
}
public function eventosPreloader() {
imageLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, prelLoading);
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, prelLoaded);
}
}
}

Now, first of all, i have to import the preloaderHorizontal.as how can i do it?
Then… even though ( i tried as document class ) it didn’t work!
Any ideas?

Other problem, on the "public function eventosPreloader() i come with some eventlisteners for the imageLoader, is there any way to make imageLoader variable?
Because not all the mc will be called imageLoader of course!