# \[Flash8\] photogallery button help

**URL:** https://forum.kirupa.com/t/flash8-photogallery-button-help/210742
**Category:** flash
**Created:** [December 21, 2006, 4:41pm UTC](https://forum.kirupa.com/t/flash8-photogallery-button-help/210742 "2006-12-21T16:41:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![WillDarling](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/willdarling/32/1990_2.png) [@WillDarling](https://forum.kirupa.com/u/WillDarling)
#### Post date: [December 21, 2006, 4:41pm UTC](https://forum.kirupa.com/t/flash8-photogallery-button-help/210742/1 "2006-12-21T16:41:18Z")

</div>

Hi,  
I’ve built a photo gallery, but need help with the “next” and “previous” buttons. I load all the images into thumbnail movieclips in the first frame. When you click on a thumbnail it places the photo into a larger movieclip.

The code when you click on a thumbnail button is:

[COLOR=RoyalBlue]on (release) {  
gotoAndPlay(“open”);  
place = “images/1”;  
}[/COLOR]

Which takes the playhead to “open” on the timeline. This is the code on “open”:

l[COLOR=RoyalBlue]oadMovie(place+".jpg", “large”);[/COLOR]

Where “large” is the movieclip that contains the picture.

I need a “next” button to load the next image in the sequence (in this case “images/2.jpg”) into “large”. I’m at a loss…can anyone help please? Do I need to make an array?

Thank you, and Happy Christmas!

Will
