# Howd he do this? Resizing slideshow

**URL:** <https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280>\
**Category:** Uncategorized\
**Created:** [March 24, 2004, 6:18pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280 "2004-03-24T18:18:59Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2004, 9:06pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/21 "2004-06-17T21:06:25Z")

</div>

mikkelbarker: have a look at scotty’s v2 zip, that will work for prev/next buttons…After looking through that code, figure out what parts you don’t understand in particular and I’m sure someone (including me) will be able to help you out further…  
But, here is the part of the code (in the V2 fla…) that controls the next/prev buttons. for this to work, you need to make mc buttons with instance names of ‘prevb’ and ‘nextb’ (your buttons don’t have any instance names)  
[AS]  
//function on ‘previous’ button on release  
prevb.onRelease = function() {  
//checks the current pic in containerMC, loads the last image of array if its first pic up  
if (cur == 0) {  
containerMC.loadPic(pArray.length-1);  
// if pic in containerMC is not first pic in array, loads the pic before the current in array  
} else {  
containerMC.loadPic(cur-1);  
}  
};  
//same thing only reversed for next button. if its the last pic of array, goes to first  
nextb.onRelease = function() {  
if (cur == pArray.length-1) {  
containerMC.loadPic(0);  
} else {  
containerMC.loadPic(cur+1);  
}  
};  
[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2004, 9:23pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/22 "2004-06-17T21:23:53Z")

</div>

Actually i have tried looking at it. But I have a lot of problems with it due the difficulty understanding the languege. I have made it work showing my pictures, but my buttons get moved around. Also i don’t yet understand the gallery\_xml.load(“gallery.xml”);  
As you can see i am quite a newbe, but eager to learn. I have though come to the point were I for the time being would like just a simple gallery to work. Once Therefor, if you would have a look at my fla. and get it to work I would be greatfull.  
Thanks 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2004, 11:14pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/23 "2004-06-17T23:14:12Z")

</div>

> [@scotty](#):
>
> Disable the next/prev buttons during the slideshow;)
> 
> ```auto
> function slideshow(){
> next_btn.enabled = prev_btn.enabled =0;
> if (cur == 0) {
> containerMC.loadPic(pArray.length-1);
> } else {
> containerMC.loadPic(cur-1);
> }
> };
> var slideInterval = setInterval(slideshow, 2000);
> stop.onRelease = function () {
> next_btn.enabled = prev_btn.enabled =1;
> clearInterval(slideInterval);
> }
> 
> ```
> 
> Where next\_btn and prev\_btn are the instancenames of your buttons:)
> 
> scotty(-:

Bedankt Scotty,

With regards to this issue how to stop the autoplay to continously looping - when they reach the last image in the array?  
Shine on.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 18, 2004, 8:07am UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/24 "2004-06-18T08:07:05Z")

</div>

Hi dr.ew,

So, your xml looks like this?:

```php

<?xml version="1.0" encoding="UTF-8"?>
<gallery path="animation/">
 <image title= "1/6"source="gallery/img_txt/images/setOne/pic1.jpg" desc="description text"/>
....
</gallery>

```

I did this aswell and added a third array to the Actionscript. This works and it loads the right text, but how do you apply the formatting tags?  
Could you show me your xml file? Or do you somehow set the tags from Flash?

Thanks,

Rufus

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2004, 1:01pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/25 "2004-07-20T13:01:58Z")

</div>

> [@dr.ew](#):
>
> is it an mx04 file? i cant open with mx.

Hi i had some luck producing a dynamic buttons.

Heres my final fla(mx) i want to replace the old menu but not sure how attatch movie works in relation to alignment.

Could someone have a look and maybe amend so the buttons appear where the old menu is with the text description underneath.

Thanks for you help…!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2004, 2:41pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/26 "2004-07-20T14:41:07Z")

</div>

Well heres my version with dynamic buts.

Thanks goes to all

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2004, 4:18pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/27 "2004-07-20T16:18:50Z")

</div>

looks good! one thing i noticed is that if you have lots of images ( and therefore lots of buttons) the button list goes off the stage, or juts out beyond container\_mc.  
if you put this in your resizeMe function, the button row will adhere to the width of the displayed image.

nav.\_width = containerMC.\_width;

the drawback is that the buttons individual width will also skew; for long images, the buttons are wide, for narrow images the buttons become narrow. but at least they will be visible=]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 21, 2004, 1:40pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/28 "2004-07-21T13:40:22Z")

</div>

Okay, I figured it out. The resizer won’t properly load swf’s that have been exported in Flash 7 player, only 6 or below. If you try to load a Flash 7 swf file then the entire movie freezes up. just FYI about an issue. It took a long night of experimenting to figure out that the error was in the export settings, lol!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 21, 2004, 8:23pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/29 "2004-07-21T20:23:45Z")

</div>

Hello from Sweden  
Thats my first post in this GREAT forum…I play with “resizeBorder\_V2” and I have two questions  
1.Is it posible that the images of the thumbnails are loading external via xml like the pictures?

2.I have see at: [http://www.amivitale.com](http://www.amivitale.com/) 2 nice effects…  
On RollOver the thumbs are loading a image and it apears a blue information arrow that (if you rollOver) show a textinfo about the photo

is this posible to include this in resizeBorder\_V2

Regards and sorry for my bad english

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 21, 2004, 11:29pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/30 "2004-07-21T23:29:35Z")

</div>

> [@vman](#):
>
> Just thought I’d post a link to a project I’m working on for my friend’s band’s Web site. The idea all started with this awesome thread (thanks again Scotty and everyone else that contributed). A lot of thanks goes to CyanBlue for helping me out with some coding issues as well.
> 
> Anyways, what it does is dynamically create a series of thumbnails in grid form based on how many images are in a particular folder (via php). It also dynamically creates a series of buttons to change galleries based on how many folders are in a particular directory (also via php). The text on the buttons is also dynamically created based on which gallery directory the images are loading from (also via php). Being a novice, this was a pretty big accomplishment for me and I learned a lot thanks to this thread and others at [AS.org](http://AS.org).
> 
> There are only 2 images in the first gallery that resize all the way at the bottom. Please let me know if you find bugs. Thanks.
> 
> [http://www.thezplane.com/test/test2.swf](http://www.thezplane.com/test/test2.swf)
> 
> If anyone would care to see the code, let me know.
> 
> BTW, the pictures don’t have anything to do with the band. They’re just some personal ones I used temporarily. Only 3 of the buttons work. I just added some empty folders to test the php code amd the dynamic text on the buttons…

Vman, very nice site. This is almost exactly what I’d like to do with my family photos. I am fairly new to Flash programming and brand new to this thread. It has been a tremendous help. I have mainly been working with V3, but I’m hoping to add a couple of things like the menu you used to navigate to other thumbs and sets of pictures. If I could get a copy of your source (.fla and whatever else), I would really appreciate it. Thanks in advance for any help. I can attach my .fla if it would help.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2004, 10:04pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/31 "2004-07-22T22:04:31Z")

</div>

mathdaddy,  
Thanks for the comp. Unfortunately, I won’t be around my computer till next Sunday as I am on vacation. I’ll post something when I get back. Just didn’t want you to think I was ignoring you.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2004, 5:07am UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/32 "2004-07-24T05:07:03Z")

</div>

> [@dr.ew](#):
>
> well okay, first youd havta go back and give the interval an ID…then make a mc, give it an instance name of stop. then use that button on release to clear the interval.  
> [AS]  
> function slideshow(){  
> if (cur == 0) {  
> containerMC.loadPic(pArray.length-1);  
> } else {  
> containerMC.loadPic(cur-1);  
> }  
> };  
> var slideInterval = setInterval(slideshow, 2000);  
> stop.onRelease = function () {  
> clearInterval(slideInterval);  
> }  
> [/AS]
> 
> that stops it…and you can even put another mc, start, to start the interval up again (another onRelease function that uses the setInterval again…)
> 
> [EDIT] Actually, for some reason, the ‘start’ idea works, but if pressed a lot can cause problems (overlapping intervals…) Also, once youve stopped it, then start it again, the stop doesnt work again. I’ll try to figure it out…[/EDIT]

This works: Create a clip or button with instance of stop and one for start. Also these functions disable the appropriate instances, thus “start” cannot be clicked more than once. There are no prev/next buttons.

Global var is the key here.

[AS]

function slideshow(){  
if (cur == 0) {  
containerMC.loadPic(pArray.length-1);  
} else {  
containerMC.loadPic(cur-1);  
}  
};

start.onRelease = function () {  
start.enabled = 0;  
stop.enabled = 1;  
\_global.slideInterval = setInterval(slideshow, 2000);  
}

stop.onRelease = function () {  
start.enabled = 1;  
stop.enabled = 0;  
clearInterval(slideInterval);  
}

[/AS]

-rm

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2004, 10:36am UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/33 "2004-07-24T10:36:34Z")

</div>

I’ve noticed that after changing the gallery.xml file Mozilla caches the xml data until the browser is shut down and restarted. I found this solution to the problem which might be useful to others:

[AS]

// Prevents caching of loaded files (TXTs, SWFs, XMLs etc…)  
String.prototype.noCache = function(){  
if ((\_root.\_URL.substr(0,5)).toLowerCase()!=“file:”){  
if(this.indexOf("?")==-1){  
return this+="?noCache="+(new Date().getTime());  
}else{ return this+="&noCache="+(new Date().getTime());  
}  
}else{ return this;  
}  
}

gallery\_xml.load(“gallery.xml”.noCache());

[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2004, 4:06pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/34 "2004-07-24T16:06:33Z")

</div>

this is the best thread ever i vonder if ther is any one out ther thet knows hov to change the fade to somting like this.

[http://www.ronmacphoto.com/](http://www.ronmacphoto.com/)

/M

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2004, 4:25pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/35 "2004-07-24T16:25:06Z")

</div>

yes of course that’s brightOffset

here add this to yur movie…

brightOffset();  
}  
};  
}

MovieClip.prototype.brightOffset = function(alpha){  
this.c = new Color(this.containerMC)  
this.o = {rb:100,gb:100,bb:100}  
this.up = true  
this.onEnterFrame = function(){  
if(this.containerMC.\_alpha \< 100){  
this.containerMC.\_alpha += 10  
}  
if(this.up == false){  
this.o.rb -= 10  
this.o.bb -= 10  
this.o.gb -= 10  
} else {  
if(this.o.rb \< 255){  
this.o.rb \*= 1.5  
this.o.bb \*= 3  
this.o.gb \*= 1.5  
} else {  
this.o = {rb:255,gb:255,bb:255}  
this.up = false;  
}  
}  
if(this.o.rb \< 0){  
this.o = {rb:0,gb:0,bb:0}  
delete this.onEnterFrame;  
}  
this.c.setTransform(this.o)  
}  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2004, 5:11pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/36 "2004-07-24T17:11:46Z")

</div>

thank you but i have no ide wher to put it in te script.

i download the mx.zip from thread 364

/M

---

<div class="post-metadata">

**Author:** ![sipher](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sipher](https://forum.kirupa.com/u/sipher)\
**Post date:** [July 24, 2004, 7:29pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/37 "2004-07-24T19:29:55Z")

</div>

HERE ARE BOTH VERSION OF THE FLA…

i hope this help…ok if not let me know

take care

this version of the mx. fla as the brightOffset AS on it…

---

<div class="post-metadata">

**Author:** ![motionsync](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/motionsync/32/781_2.png) [@motionsync](https://forum.kirupa.com/u/motionsync)\
**Post date:** [July 25, 2004, 1:58am UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/38 "2004-07-25T01:58:57Z")

</div>

GREAT JOB!!!

My questions is if it is posible that the button have a lite thump of the Pictures  
or on (on RollOver) like att [http://www.amivitale.com/main.html](http://www.amivitale.com/main.html)

Lambis

---

<div class="post-metadata">

**Author:** ![nessie](https://avatars.discourse-cdn.com/v4/letter/n/e274bd/32.png) [@nessie](https://forum.kirupa.com/u/nessie)\
**Post date:** [July 25, 2004, 2:51pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/39 "2004-07-25T14:51:52Z")

</div>

Thank you so very much it look´s excellent. 😃 . I wonder if its possible to have the same effeckt when image fades away ???

-thanks !

/M

---

<div class="post-metadata">

**Author:** ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)\
**Post date:** [July 25, 2004, 4:56pm UTC](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280/40 "2004-07-25T16:56:44Z")

</div>

Hey Sipher I’m on MX and got “unexpected file format” when trying to open your file. Any chance you could repost it?

:hr:

[Previous page](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280.md?page=1)

[Next page](https://forum.kirupa.com/t/howd-he-do-this-resizing-slideshow/105280.md?page=3)
