
Originally Posted by
Matt Doyle
Hi Matt..
I am doing the image load though a Loader object. Here is the code:
Code:
public class B3DLoader extends MovieClip {
public var ldr:Loader;
public var image:Bitmap=null;
public function B3DLoader() {
// constructor code
ldr = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadComplete, false, 0 , true);
}
public function LoadingImage(p_path:String):void
{
var url:String;
var urlReq:URLRequest;
url = p_path;
urlReq = new URLRequest(url);
ldr.load(urlReq);
}
public function LoadComplete(event:Event):void
{
image = Bitmap(ldr.content);
image.smoothing = true;
addChild(image);
}
public function RemoveImage():void
{
if(image!=null)
removeChild(image);
}
}
As you can see in the LoadComplete method i add the image to the stage, but when i test the game its showing me the image very pixelated, Why may be these?
Bookmarks