...'K, it occured to me that because this gallery re-sizes the photo when/if needed,
that a bit of Bitmap smoothing would be required to keep the photos looking good.
I have noticed on a couple of the pictures I know are being re-sized, how jagged some of the lines in the image are looking.
For me the trick was to figure out the easiest way to add this feature to what
I have already written, after the fact as it were, and just where to add what I need.
After a bit of reading on the subject, I think the best place to add the 3 lines of script needed is in each of the 2 "mcListener.onLoadInit = function"s with in the "MovieClip.prototype.myToggleReader"
function.
Also, each of these 3 lines of script would need to be added
before any re-sizing is actually done.
var bitmap:flash.display.BitmapData = new flash.display.BitmapData(target._width, target._height, true);
hold1.hold1a.attachBitmap(bitmap, hold1.hold1a.getNextHighestDepth(), "auto", true);
bitmap.draw(target);
and
var bitmap:flash.display.BitmapData = new flash.display.BitmapData(target._width, target._height, true);
hold2.hold2a.attachBitmap(bitmap, hold2.hold2a.getNextHighestDepth(), "auto", true);
bitmap.draw(target);
MovieClip.prototype.myToggleReader = function(myG:Number,myI:Number):Void{
Gg = myG;
Pp = myI;
if (SetToggle == true){
buildPreloader();
hold1._alpha = 0;
var hold1a:MovieClip = hold1.createEmptyMovieClip("hold1a", hold1.getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
var mcListener:Object = new Object();
mcListener.onLoadStart = function(target:MovieClip) {
eggsLoader._xscale = 0;
};
mcListener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
var totLoaded:Number = Math.round(bytesLoaded/bytesTotal*100);
eggsLoader._xscale = Number(totLoaded);
myMenu.desc_txt.text = "Image: " + Number(totLoaded) + " % Loaded";
};
mcListener.onLoadComplete = function(target:MovieClip):Void {
removeMovieClip(eggsLoader);
myMenu.desc_txt.text = imageData[myG][myI][2];
current_pos = myI+1;
myMenu.pos_txt.text = current_pos+" / "+ _global["GItotal_"+myG];
Pp=Pp;
picTrans();
};
mcListener.onLoadInit = function(target:MovieClip):Void {
var bitmap:flash.display.BitmapData = new flash.display.BitmapData(target._width, target._height, true);
hold1.hold1a.attachBitmap(bitmap, hold1.hold1a.getNextHighestDepth(), "auto", true);
bitmap.draw(target);
w = target._width;
h = target._height;
if (w != 0 && h != 0) {
scaler = scalerf(w, h);
if (scaler != 100) {
target._xscale = scaler;
target._yscale = scaler;
}
if (menuTrig == "open")target._parent._x = (Stage.width/2)-(target._width/2)+(175/2);
if (menuTrig == "close")target._parent._x = (Stage.width/2)-(target._width/2);
target._parent._y = (Stage.height/2)-(target._height/2);
}
target.filters = [myShadow];
//target._quality = "BEST";
if(allowLink)target.onRelease = target.onReleaseOutside = function() {
getURL(imageData[myG][myI][0], "_blank");
};
this.removeMovieClip();
};
mcLoader.addListener(mcListener);
mcLoader.loadClip(imageData[myG][myI][0], hold1.hold1a);
}else if(SetToggle == false){
buildPreloader();
hold2._alpha = 0;
var hold2a:MovieClip = hold2.createEmptyMovieClip("hold2a", hold2.getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
var mcListener:Object = new Object();
mcListener.onLoadStart = function(target:MovieClip) {
eggsLoader._xscale = 0;
};
mcListener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
var totLoaded:Number = Math.round(bytesLoaded/bytesTotal*100);
eggsLoader._xscale = Number(totLoaded);
myMenu.desc_txt.text = "Image: " + Number(totLoaded) + " % Loaded";
};
mcListener.onLoadComplete = function(target:MovieClip):Void {
removeMovieClip(eggsLoader);
myMenu.desc_txt.text = imageData[myG][myI][2];
current_pos = myI+1;
myMenu.pos_txt.text = current_pos+" / "+ _global["GItotal_"+myG];
Pp=Pp;
picTrans();
};
mcListener.onLoadInit = function(target:MovieClip):Void {
var bitmap:flash.display.BitmapData = new flash.display.BitmapData(target._width, target._height, true);
hold2.hold2a.attachBitmap(bitmap, hold2.hold2a.getNextHighestDepth(), "auto", true);
bitmap.draw(target);
w = target._width;
h = target._height;
if (w != 0 && h != 0) {
scaler = scalerf(w, h);
if (scaler != 100) {
target._xscale = scaler;
target._yscale = scaler;
}
if (menuTrig == "open")target._parent._x = (Stage.width/2)-(target._width/2)+(175/2);
if (menuTrig == "close")target._parent._x = (Stage.width/2)-(target._width/2);
target._parent._y = (Stage.height/2)-(target._height/2);
}
target.filters = [myShadow];
//target._quality = "BEST";
if(allowLink)target.onRelease = target.onReleaseOutside = function() {
getURL(imageData[myG][myI][0], "_blank");
};
this.removeMovieClip();
};
mcLoader.addListener(mcListener);
mcLoader.loadClip(imageData[myG][myI][0], hold2.hold2a);
}
};
I updated my
home gallery, and it seems to be much better.
I really notice the change in the first dahlia pic(1/28), on the virticle bits of the stair rails
and 7/28 in the petals of the dahlia flower.
(SM2 swi)