+1  A: 

You can get the width and height of the image using the ImageLoader object public functions getWidth and getHeight but you need to know when the load is complete, so you could dispatch a event from ImageLoader completeHandler, like:

// declare public static constant
public static const COMPLETE : String = "complete";
// inside complete handler
dispatchEvent(new Event(ImageLoader.COMPLETE));

done with this you can now listen to this event from your Main class like this:

myImg2 = new ImageLoader( img2 );
myImg2.addEventListener(ImageLoader.COMPLETE, onImageLoadComplete);

// inside onImageLoadComplete handler you can read the width and height:
private function loadComplete(evt : Event) : void 
{
    trace (ImageLoader(evt.currentTarget).getWidth());
    trace (ImageLoader(evt.currentTarget).getHeight());
}
dome
i did exactly what you suggested but i get 0 and 0 as a result. I updated the code in my first post to be sure i embed your code correctly.
Ponty
Yes i found my error!! i had to put the dispatch statement after the computations of width and height. Thanks dome!
Ponty
Actually, i can't make any progress on my main work yet because i cannot use these values (width, height) in my Main constructor body. When i try to save the values in onImageLoadComplete to variables and use them in constructor i still get 0 as result :(
Ponty
the constructor of your Main class is the first code to be executed so it seams to me logic that those values are not updated yet. So as far as I can see the order that things get executed in your code would be: | 1-> Main (constructor) | 2-> ImageLoad (created inside Main constructor) | 3-> load image | 4-> ImageLoad.completeHandler (here there is the dispatchEvent(new Event(ImageLoader.COMPLETE))) |5-> Main.loadComplete.So the values you expect are only available where the loadComplete function fires, long time after the constructor of the Main class being executed.
dome