Photo Gallery and Thumbnails: Flash Tutorial!
Flash Tutorials
29th Jan 2010
25 Comments »
Check this video out at Hi-Res here: www.tutvid.com We will make a nice little photo gallery in Flash in the following tutorial. All you need are a few images and a few thumbnails for them, the rest is just follow along and it works with any images!


Otherwise are two different pics, executing the “same” action.
Capiche?
No that’s As3. So for the bit of code:
btn1.addEventListener(MouseEve nt.CLICK, actie15);
function actie15(event:MouseEvent):void {
fotosMC.gotoAndPlay(“img1″);
;
}
Above is for the first thumb.
Second thumb:
btn2.addEventListener(MouseEve nt.CLICK, actie16);
function actie16(event:MouseEvent):void {
fotosMC.gotoAndPlay(“img2″);
;
}
So, you give an action to a thumbnail. But in AS3 you have to give every “action” another name.
Yeah dude, absolutely. This was awesome. I am a comeplete noob and I basically took an hour and a half to go through this three time…just listening to the audio and doing my own thing in CS4. I now know how to do it and feel comfortable doing it on my own without instruction. I appreciate it. Davegas: patience my man. It’s a virtue.
absolute cock. as a newbie I could not follow this video.
Cheers for thhe tutorial.
changed some things around, i used flash cs4 using AS2, thing i found for anyone doing it in CS4 is that when you click the “motion tween” to make it fade to whole, in cs4 this is called “classic tween” the motion tween on cs4 will not work idk why but classic tween does the same thing.
cheers for the video, keep em coming
Yeah. Not sure if this was asked already or not, but how come the alpha scrip only works with AS2? I’m completely noob to flash, and I’m just curious. I get errors when I export with as3, but exporting with as2 it works fine.
I used this code and was successful for the 1st thumbnail. However, with AS3, for some unknown reason i cannot modify each thumbnail individually. by that i mean clicking on the thumb and going into the script to enter the code. Is there some way to do this?
@Saltomurs
So, in CS4 if I use Actionscript 2 and not 3 it will work?
Maybe try changing the frame rate to slow it down.
hi, what if I wanted accompanying text with the pictures? Can I put text and picture together as one symbol?
Problem Solved!! JUST set your publish settings to actionscript2 and follow the instructions as tutvid says! thanks a bunch, man you rule!!!
thanks a lot!. but it would have been a lot helpful if you mentioned at the beginning to make sure we use actionscript2!
i’ve followed the tut just about exactly and when checking have no script errors but for some reason when i preview and click the buttons to make sure they work nothing happens
thanks
For the proper control of images, in AS3:
btn1.addEventListener(MouseEvent.CLICK, actie15);
function actie15(event:MouseEvent):void{
fotosMC.gotoAndPlay(“img1″);
;
}
Hi..went thru this great video..does anyone know how to 1. Slow down the scroll and 2. How to stop the automatic play of scrolling and be abel to click and activate the scroll…NEED HELP thx! : )
When it gets to 22:28 adding action script to the thumbs . . . I click a button on the stage (MasterClipMC) I press F9 and my action script prompter comes up and says “Current selection cannot have actions applied to it.” What am I doing wrong?I am using CS4 and had to go in one by one to create each state for my buttons . . . did that mess things up? HELP
i have the same problem! I tried it in AS2 and AS3, too….argh
all those using flash cs4 use this code for the button rollover:
import flash.events.MouseEvent;
thumb1.addEventListener(MouseEvent.MOUSE_OVER, manageMouseOver1);
thumb1.addEventListener(MouseEvent.MOUSE_OUT ,manageMouseOut1);
function manageMouseOver1(e:MouseEvent) :void{
thumb1.alpha=1;
}
function manageMouseOut1(e:MouseEvent): void{
thumb1.alpha=0.5;
}
when i try placing action script on mu thumbAS layer
it says
extra characters found at the end of the programm HELP?when i delete the curly brackets though it says fnot specified :/
really good :]
About three months ago life circustances forced me to learn CSS/HTML code so I can design and create our website from scratch.
I credit you and about 10 other css teachers for making it possible for me, a 62-yr grandma, to experience the beauty of creating with css within my lifetime. Thank you.
I love Your tutorials. Thank You.
I designed this gallery and it looks great only my images are top left of the page, I followed the centre instructions to the letter. Im not sure where I went wrong, how do I centre it to the stage.
Thanks
Awesome. Thanks a lot
Really nice Tutorial 5 stars