Howd he do this? Resizing slideshow

Thanks FlashPlaya!

Put this code in you´r first frame code.


galery._x = Math.round(this._x-this._width/2);
galery._y = Math.round(this._y+this._height/2+spacing/2+12);


/M

sweet work nessie, very slick and nice ideas for the menu.

Can you tell me your code for the ‘info’ button that displays the screen onrollover and hides it onrollout, I’ve been trying to get that to happen for ages!

Thanks

Hey Nessie,
:h: What file?? I am have so many of these files. I have no Idea which one. Thanks mang for helping me out with all this!!! :love:

some of the zips don’t have the xml file attached
there’s a tut here http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm which helped me greatly…it interacts with the xml
now how can i apply this(great, insane, phenomenal, inspiring, timesaving…i could go on) resize effect to it, with that exact xml file.

if you have already answered this question, please direct me to the post or thread. your time is much appreciated

sotty your an “actionscript god” :wink:

hope this helps !

thanx nessie, i’m having trouble with that though, all good though, i’ll try and figure it out.

that aside, i think i’ve figured a way to do that “christopherknock menu”!
stand by :wink:

Hello all,

I was wondering if it’s possible to use this script with .gif images? I can get it to work with .jpg images with names like wallpaper01.jpg and wallpaper02.jpg, but when I try to use .gif images it does not load anything…

It would be much better with .gif’s because I am getting the image distortion on alpha tween using .jpg images…

Any help would be appreciated.

Welcome to kirupa forums=)

You can’t load .gif’s dynamically…

scotty(-:

“christopherknock menu” ??

titel.onrollOver= function(){
_root.galery.desc_bg.gotoAndPlay(2);
_root.titel.gotoAndStop(2);
}

titel.onrollOut= function(){
_root.galery.desc_txt._visible = 0;
_root.galery.desc_bg.gotoAndPlay(11);
_root.titel.gotoAndStop(1);
}

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(-: