PDA

View Full Version : Anti-alias bitmaps once resized?


isointeractive
05-03-2006, 05:33 PM
Hello every one.

I have a zoom tool that can be viewed at:

http://www.thomasent.com/properties/al1-3.asp

The problem is the image is loaded then reduiced in size to fit the window. Once it is loaded many of the images looked very aliased. It there a way to make the images (once the width and height is reduced) to make them appear anti-aliased?

I have tried allowsmoothing and quality of best. But the client just wants to image to be clear nomatter what the size.

attached here is only the movie clip loader just for the image. The rest in not relevent to this.

Please any help is welcomed.

////////////////

//////////////////////////////////////
_root.traceBox.vScrollPolicy = "on";
//trace function
function myTrace(msg) {
_root.loadingText.text = msg;
//_root.traceBox.text += msg + newline;
//_root.traceBox.vPosition = _root.traceBox.maxVPosition;
}
/************************************************** *******************/
//init
var myMCL = new MovieClipLoader();
/************************************************** *******************/
//callbacks
myMCL.onLoadStart = function(targetMC) {
var loadProgress = myMCL.getProgress(targetMC);
myTrace("The image has started loading");
myTrace("Bytes loaded at start="+loadProgress.bytesLoaded);
myTrace("Total bytes loaded at start="+loadProgress.bytesTotal);
myTrace("____________________________________");
};
myMCL.onLoadProgress = function(targetMC, loadedBytes, totalBytes) {
//myTrace ("movie clip: " + targetMC);
myTrace("Bytes loaded at progress callback="+loadedBytes);
myTrace("Bytes total at progress callback="+totalBytes);
myTrace("____________________________________");
};
myMCL.onLoadComplete = function(targetMC) {
myTrace("The image has finished loading.");
var loadProgress = myMCL.getProgress(targetMC);
myTrace("Bytes loaded at end="+loadProgress.bytesLoaded);
myTrace("Bytes total at end="+loadProgress.bytesTotal);
};
myMCL.onLoadInit = function(targetMC) {
myTrace("");
targetMC._width = 400;
targetMC._height = 240;
targetMC._x = -320;
targetMC._y = -240;
//myTrace("____________________________________");
};
myMCL.onLoadError = function(targetMC, errorCode) {
myTrace("ERRORCODE:"+errorCode);
myTrace(targetMC+"Failed to load its content");
//myTrace("____________________________________");
};
/************************************************** ******************/
//load the files in to their respective targets
//myMCL.loadClip("al1-1.jpg", "_level0.zoom.product");
myMCL.loadClip("../assets/uploaded/"+v_image, "_level0.zoom.product");
_level0.zoom.product.allowSmoothing = true;