Smoothing images loading dynamically!


i m loading images dynamically from a folder and i want when they show on the stage they retain their quality for that purpose i use 2 things first is

stage.quality = StageQuality.BEST;

and the second is with bitmap class after loading the images in loader i write…

Imageload.load(new URLRequest ("images\\"+xml.images[k]));
var image:Bitmap = Imageload.content as Bitmap;
image.smoothing = true;

but i gives me the following error…

[TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at BaseClass/::loadimage()

anyone comes up with the solution…