Ive tried searching these forums for resizing and slideshow but dont get what im looking for.
Im trying to learn how to build a thumbnail gallery that when you click on the thumbnail the photo will load in an empty movie clip and the emptymovieclip will resize itself to the size of the photo.
i guess i dont know what its called. but that link is pretty much what im looking for if I could turn those little numbers hes got there into thumbnails…
I’m sure everyone is sick of returning to this thread, but I’ve been trying for the past week or so to figure this one out, but I am a bit stumped and could use a bit of guidance…
What I’m trying to do is dynamically create a menu of thumbnails from the array of images into a scrollpane, whcih would then call up the resize function of that image in the larger containerMC upon clicking.
I know that I’ll need a for loop that will create empty clips for each of the images in pArray, these clips would be inside a holder mc that would be set as the scrolling content of the scrollpane using setscrollcontent(); and that I could position these empty clips 5 px apart from each other by offsetting its _x by 5 for each clip created.
I want to also include this code that would take the images already in pArray and automatically resize them for the scrollpane so that they would have a max height of say 50 px. (very similar to the code I used in my post above…) which would look like:
[AS] thbHMax = 50;
if (thumb._height>thbHMax) {
thumb._height = thbHMax;
thumb._xscale = thumb._yscale;
[/AS]
But I’ve been spinning my tires trying to get this idea into actual code, let alone adding functionality to the thumbnails.
I know that people (especially scotty =] ) have already put so much into this thread, and I really wanted to figure this addition out on my own so that I could contribute something also, but its just been a frustrating ordeal for me.
If someone could point me in the proper direction I would really really appreciate it!
I Have had very much help getting a photo gallery to work, but could use a little help. Instead of loading a specific picture, how can i get a forward button to load the next picture. I want to be able to navigate through my album using only forward and backwards buttons.
In the tutorial they use
on (release) {
_root.changePhoto(1);
}
My pictures are called pic1, ect.
Thanks
Thanks again scotty, I missed that thread… from a quick view, I think it will show me everything I need to know to adapt to what I need, but I may have a q or 2 (more specific I promise) if thats ok=]
Mikkelbarker: check out post, #119, scotty’s v2.zip has forward/backward buttons.
He scotty.
Ik ben redelijk nieuw met scripten. Heb jij misschien een idee voor dit script (resizen van foto’s met inladen) voor flash v5.
alvast bedankt
Scotty,
How to make this ultra superb gallery play automatically on loading/enter frame? I understand the principal of setInterval but I don’t know how to incorporate them in the script.
Also, it’ll be great if there’s stop and pause button while playing automatically.
Thanks.
add a function, slideshow, that will go through the pics in the array, then use setInterval to call it up every n milliseconds.
(at the end of the script on the first frame, add this:)
[AS]
function slideshow(){
if (cur == 0) {
containerMC.loadPic(pArray.length-1);
} else {
containerMC.loadPic(cur-1);
}
};
setInterval(slideshow, 2000);
[/AS]
that’ll change the image every 2 seconds. (change 2000 to change the duration)
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]
Thanks dr.ew,
I laso notice that during the autoplay works, the next/previous button will make the slide goes berserk if it is pressed ( interupt the interval?). Meanwhile I’ll try your suggestion above.
Shine on you…
[dutch]Ik zou het niet weten…:)[/dutch]
I really shouldn’t know. It has been ages since I last used Flash5, so I don’t know what is supported there. I think it’s best to start a new thread on the flash5 forum, maybe somebody can help you there:)
I’m using the script for the dynamic slideshow you’ve posted here…It’s great!
I’ve been trying to add a feature that let’s you load a text caption for each image…Like the image title that was in your set-up…
What I wanted to do is load this text to a dynamic textfield, from the same xml that states the image URL’s and the image titles, BUT the text needs to be formatted(i.e. Bold, font color, font size…)
I added a ‘caption’ ‘node’? in the xml file and it works, but as soon as I want to add formatting, the skideshow stops working???
Would you know what the best way is to load some text from an external xml that uses CSS formatting, that goes with the Appropriate image?
I could really use your help on this…been breaking my head for days already…
Rufus,
Have a look at the code I posted on page 19…You’ll notice that there are 3 arrays, the extra dArray is for a description. In the xml, I’ve added an attribute ‘desc’ to each image node.
I’m not really sure about CSS and such with this, but you can format the entire dynamic textfield that the description is inputted into (so bold, font, size, colour is taken care of at least…)
Mucho, this file is no longer available, and I am curious to know how to put this together with the dynamicly loading thumbnails. When I try running the file that Scotty posted it errors saying that the XML stuff folder can’t be found. Do you still have a copy of this, or does someone else nowhere I can find it so I can try to implement this.
Apperently i just can understand that F… actionscript language I have tried to get a back an forward button to work, but it won’t work. Apperently I am to stupid.
I have attached my fla, and if anyone will help getting it to work, I will be greatfull.
I would like the back and forward button to pick the previus and next picture in my folder “pictures”, ( instead of selecting a specific picture) and i would like the first picture in the folder to load automatickly.
Also, it seems that changing from one picture to another, it first loads with low alpha in the background and a different place.
If anyone will take the time to explain the code in detail (and I mean detail :-)) I will buy him/her a cop of coffe if you ever visit Danmark.