# Add Thumbnail Button question

**URL:** <https://forum.kirupa.com/t/add-thumbnail-button-question/164568>\
**Category:** flash\
**Created:** [October 2, 2005, 11:15pm UTC](https://forum.kirupa.com/t/add-thumbnail-button-question/164568 "2005-10-02T23:15:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pharoh32](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@Pharoh32](https://forum.kirupa.com/u/Pharoh32)\
**Post date:** [October 2, 2005, 11:15pm UTC](https://forum.kirupa.com/t/add-thumbnail-button-question/164568/1 "2005-10-02T23:15:18Z")

</div>

I’ve done the turoial for xml gallery with thumbnails. I modified it to add some animations and my prev/next buttons are now inside of a movie clip. They don’e work any more. None of the code has change just the positio of the buttons in my movie.

Here is a piece of the code that makes the buttons work.

listen = new Object();  
listen.onKeyDown = function() {  
if (Key.getCode() == Key.LEFT) {  
prevImage();  
} else if (Key.getCode() == Key.RIGHT) {  
nextImage();  
}  
};  
Key.addListener(listen);  
previous\_btn.onRelease = function() {  
prevImage();  
};  
next\_btn.onRelease = function() {  
nextImage();  
};

According to what I understand from the tutorial, this function uses instance names. The buttons should work no matter where the buttons are in the movie.
