# Creating clickable clips inside a gallery

**URL:** <https://forum.kirupa.com/t/creating-clickable-clips-inside-a-gallery/261320>\
**Category:** Uncategorized\
**Created:** [May 26, 2008, 11:42am UTC](https://forum.kirupa.com/t/creating-clickable-clips-inside-a-gallery/261320 "2008-05-26T11:42:55Z")\
**Posts on this page:** 1\
**Page:** 1

<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:** [May 26, 2008, 11:42am UTC](https://forum.kirupa.com/t/creating-clickable-clips-inside-a-gallery/261320/1 "2008-05-26T11:42:55Z")

</div>

I’d like to ask for help on this here thing. I’ve got a sliding gallery that loads images through xml. there’s a loop that checks the xml and creates a named movieclip for each image. so far so good.

thing is, each one of the images in this sliding gallery are supposed to work as buttons that will open a larger version of the image. I tried to make the images “clickable” and tested that with a trace indicating the image number. this is my code:

\*for (var i = 0; i\<allImages.length; i++) {

//goes through all images in the xml file  
var currentImage = allImages\* \*.firstChild.firstChild.nodeValue;

//creates clip for each one  
var slideItem = \_root.mouros\_mc.windowMouros\_mc.slideMouros\_mc.cre ateEmptyMovieClip(“slideItem”+i, i);

//makes each clip clickable and displaying the item’s number  
\_root.mouros\_mc.windowMouros\_mc.slideMouros\_mc[“slideItem”+i].onMouseDown = function(){  
trace("you’ve pressed item " + i);

}

}\*

nothing happens, though. it doesn’t trace and I can’t get it working…  
please help!

thanks in advance
