Howd he do this? Resizing slideshow

Thanks for the quick reply scotty, it’s nice to see that you are still monitoring this thread! Nice thread 2, thanks for all the help you’ve been giving everyone - you’re practically making everyone’s website that visits and uses this discussion!

When I use the original code you’ve supplied without the alpha effect I have no problems with image distortion on my jpg’s, however if do use the alpha effect then my images shift when they load into place… It looks bad when they do that…

I will most likely be sticking with the original code when I decide to use this effect.

Thanks again for all the help.

raga-

Hey all,

This project is great! :rock:

I do have some questions:

I’m trying to load the Thumbs dynamically with XML!, and can’t figure it out.

I would also like to limit the Thumbs width (by that I mean how far they will go) I would like to seperate them into rows.

If anyone could help that would be great (scotty hint…hint) :eye:

Thanks,

Case :bu:

and the thread keeps going… for the life of me I can’t stop the image from flickering… it seems that on the first frame of the resize me function… everything evaluates to true… and makes my image 100% visible… then on consecutive passes, the it’s false, resizes the border and displays my image… the flicker is acceptable on relatively the same size image, but on different ratios the flicker is REALLY apparent… any ideas? here’s my code:

MovieClip.prototype.loadPic = function(pic) {
	cur = pic;
	this._alpha = 0;
	this.loadMovie("images/db/body/"+imgLoc[pic]);
	this._parent.onEnterFrame = function() {
		var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
		if (t != 0 && Math.round(l/t) == 1 && containerMC._width>0 && containerMC._height>0) {
			var w = containerMC._width+spacing, h = containerMC._height+spacing;
//everything below is to control the maximum image size
			imgWidth = containerMC._width;
			imgHeight = containerMC._height;
			if (imgWidth<imgHeight) {
				imgRatio = imgWidth/imgHeight;
				containerMC._width = imageSize*imgRatio;
				containerMC._height = imageSize;
			} else if (imgWidth>imgHeight) {
				imgRatio = imgHeight/imgWidth;
				containerMC._width = imageSize;
				containerMC._height = imageSize*imgRatio;
			} else if (imgWidth == imgHeight) {
				containerMC._width = imageSize;
				containerMC._height = imageSize;
			}
			border.resizeMe(w, h, pic);
			delete this._parent.onEnterFrame;
		}
	};
};
MovieClip.prototype.resizeMe = function(w, h, pic) {
	var speed = 3;
	this.onEnterFrame = function() {
		containerMC._alpha = 0; // had to put this in to stop it from displaying straight off
		this._width += (w-this._width)/speed;
		this._height += (h-this._height)/speed;
		//nav._x = Math.round(this._x-this._width/2); Don't use a nav bar
		//nav._y = Math.round(this._y+this._height/2+spacing/2);
		prevb._x = this._x-this._width/2-5;
		nextb._x = this._x+this._width/2+5;
		nextb._y = prevb._y=this._y-5;
		imageText._y = this._y+this._height/2+5;
		imageText._x = border._x-picinfo._width/2;
		photo._y = this._y-this._height/2;
		photo._x = this._x-this._width/2+5;
		photo.photoID.text = imgPG[pic];//little drop shadow effect 
		photo.photoID1.text = imgPG[pic];//little drop shadow effect 
		imageText.text = imgCap[pic];
		if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
			this._width = w;
			this._height = h;
			containerMC._x = this._x-this._width/2+spacing/2;
			containerMC._y = this._y-this._height/2+spacing/2;
			containerMC._alpha = 100;
			delete this.onEnterFrame;
		}
	};
};

EDIT: Anyone interested in my solution… I just got rid of the _parent in the first delete onEnterFrame. Don’t remove the first _parent, which creates the onEnterFrame, just in the “delete” :wink: don’t ask me why this works, but now everything is a-ok

original:

   }
            border.resizeMe(w, h, pic);
            delete this._parent.onEnterFrame;
        } 

Fixed:

 }
            border.resizeMe(w, h, pic);
            delete this.onEnterFrame;
        } 

bump?

hi,
How can i add a description dynamic text to that fla. When I clicked to thumb it will read from xml. I couldnt achieve…

I’m just trying to get a preloader to work in the V3withThumbs. I’ve tried every preloader listed in this thread and none of them work. Not one. I’d like to have the thumbs at 20% alpha while the full pic is loading, and then have the thumb turn 100% as the full size pics load… saw that effect in the artgallery_new2new2004.fla. But I can’t get that gallery to work.

So how do you get a preloader… any preloader… to work in the V3withThumbs gallery?

hello, i’m try to use this gallery - does anyone know how to change the code, so there is a solid x position of the gallery (images are flushed to left side of the page)? thanks for any help!


function resizeMe(w, h) {
    //border tween:
    border.tween(["_width", "_height"], [w, h], speed_resize, tweentype_resize);
    //pic and picinfo fade in:
    containerMC.alphaTo(100, speed_fadeIn, tweentype_fadeIn, speed_resize);
    picinfo.alphaTo(100, speed_fadeIn, tweentype_fadeIn, speed_resize);
    //pic position:
    containerMC._x = border._x-containerMC._width/2;
    containerMC._y = border._y-containerMC._height/2;

Hi all
I have used this gallery before and its work great for me. It’s been great.

What i am trying to do now is use the v3 multiple gallery to be totally XML based.

Right now the main galleies have to be statically put. There are 4 galleries right now.

I was wondering is there a way to make all the name of the galleries to be dynamic as well.

thanks

yogi

I had no idea a resizing gallery would generate 55 pages.

@bhogiyogi: http://www.kirupa.com/forum/showthread.php?t=213873 post #3

@jasmine: If I understand you right, set the registration point of the border mc to the center right and change your code like this

function resizeMe(w, h) {
    //border tween:
    border.tween(["_width", "_height"], [w, h], speed_resize, tweentype_resize);
    //pic and picinfo fade in:
    containerMC.alphaTo(100, speed_fadeIn, tweentype_fadeIn, speed_resize);
    picinfo.alphaTo(100, speed_fadeIn, tweentype_fadeIn, speed_resize);
    //pic position:
    containerMC._x = border._x-containerMC._width;
    containerMC._y = border._y-containerMC._height/2;
}

scotty(-:

i can’t see the file T-T i get a message “Cannot download open the location, The server has sent an invalid response or not recognized”

??

scotty(-:

Hi Scotty, please help!
I’m using the xml gallery fla from this thread . Fantastic!
here is my question…
When I have thumbnails in 100s (say 200 to 300) , the script wait for all thumbnails to be loaded before I can click on the thumbnail to view the main image.
Is ‘AS’ not multi-threaded? Can I not view the slide image parallely when the thumbnail loading is in progress?
FYI: Thumbnail size average is 5 to 10KB and the slide image is around 100KB., I tested on m/c with 3GHz and 2GB ram.
Just from my initial tests, the xml gallery version posted in this thread (http://www.kirupa.com/forum/showthread.php?t=202132) does seem to allow load the main image when the thumbnail loading is in progress!
Any insight how this can be resolved? I don’t want the user to wait till all the thumbnails are loaded.
Thank you very much!
S A R A

Off course it’s possible:)
Chenge the loadButtons and nextButton function like below (and you can skip the acivateButtons function)

function loadButtons() {
	//added next two lines
	var but = th_nav["thmb"+tnNr];
	but.id = tnNr;
	var tbox = th_nav["thmb"+tnNr].box;
	tbox.loadMovie(tArray[tnNr]);
	temp = this.createEmptyMovieClip("tmp"+tnNr, 999);
	temp.onEnterFrame = function() {
		bt = tbox.getBytesTotal();
		bl = tbox.getBytesLoaded();
		var per = Math.round(((bl/bt)*100)/tArray.length);
		bar._width = ((totPer+per)/100)*curwidth;
		info.text = "loading thumbnail "+(tnNr+1)+" of "+tArray.length+" total";
		if (bt == bl && bt>4) {
			//set the onrelease actions here, so you can use each thumb that has loaded
			but.onRelease = function() {
				container.loadPic(pArray[this.id], iArray[this.id]);
				disButtons2(this.id);
			};
			nextButton();
			totPer += per;
			delete this.onEnterFrame;
		}
	};
}
function nextButton() {
	if (tnNr<tArray.length-1) {
		tnNr++;
		loadButtons();
		if (tnNr == 1) {
			//show the first pic if the second thumb gets loaded
			th_nav.thmb0.onRelease();
		}
	} else {
		mainButtons();
	}
}

btw welcome to kirupaforums :slight_smile:

scotty(-:

Scotty,
Fantastic! That worked. Thanks a lot.
If there is any issue with loading the thumb image, then the script stops. (when thumbnail image not found or when it’s not in jpg format). I’ll add some delay logic to wait and see if it loads or else continue with the next thumbnail loading. Anyway, this is a homework for me :slight_smile:

Hi

Im new here and was wondering if someone can look at my file for this auto resize image container. My file is too large to post here so can someone send me an email address and I can send the file there?

Thanks in advance

Hello Scotty and crew,

May I beg some help on the xml for the multiple gallery version? I need to expand on the gallery info. Instead of one sold paragraph, I need to make a list, with sublists. Here is the sort of thing I need to display with each gallery:

[FONT=Wingdings]v[/FONT]1968 E.M.POLLMANN (with link to Pollmann’s site)

[FONT=Wingdings]Ø[/FONT]Versatile, Colorful Tone
[FONT=Wingdings]Ø[/FONT]Pollmann Quality Material & Construction
[FONT=Wingdings]Ø[/FONT]Consignment Sale - No Sales Tax!
[FONT=Wingdings]Ø[/FONT][U]Specifications[/U]
[LIST]
[][FONT=Wingdings]§[/FONT]String Length - 41.0 Inches
[
][FONT=Wingdings]§[/FONT]Body Length - 109.6cm
[][FONT=Wingdings]§[/FONT]Upper Bout Width - 48.7cm
[
][FONT=Wingdings]§[/FONT]Middle Bout Rib Depth - 35.7cm[/LIST] [FONT=Wingdings]Ø[/FONT][U]Standard Classic Contrabass Setup[/U]
[LIST]
[][FONT=Wingdings]§[/FONT]Adjustable Bridge
[
][FONT=Wingdings]§[/FONT]Solid Ebony Fingerboard
[][FONT=Wingdings]§[/FONT]German Endpin
[
][FONT=Wingdings]§[/FONT]Professionally Dressed Fingerboard
[][FONT=Wingdings]§[/FONT]Properly Fitted Soundpost
[
][FONT=Wingdings]§[/FONT]Stele Cable Tailgut[/LIST]

I honestly tried to get my head around it, but only managed to break the file pretty good. After a couple of days I figure I’d better ask. Any help greatly appreciated!
Best,
John

Hi, I’m using the multiple border resizing script, works great! :cap:
But I don’t want to navigate trough lose buttons, but with prev and next buttons, how is that possible? :be:

Allready thanks =)

matt

I could not open your fla, may be F8, so I’m not really shure what you are trying to do.
This should center an MC on Stage in Relation to Stage width and height.Maybe for the _y Position you have just to write the apposite number.

ContainerMC._x = (Stage.width-ContainerMC._width)/2;
ContainerMC._y = (Stage.height-ContainerMC._height)/2;

or in you case:

ContainerMC._x = (Stage.width-ContainerMC._width)/2;
ContainerMC._y = 450;// or whatever

hey guys … Great Thread ! Thanks a lot for all the help !.
I’ve got a quick question … is it possible to use text as links instead of the thumbnails in one of these galleries like for example :
Go to the Projects section of each. (by the way both sites are cool too)

http://www.easybit.it/flash2005/main.php?language=eng
http://www.workrocks.com/?lang=en

and also how could you add more pics let’s say you’ve got one of your works and then you want to show 3, 4 etc pics of the same work ? (you can see this in the examples above as well) Im sure this is more advanced anyway any help would be appreciated.

thanks.