# \[Flash 8\] XML gallery - show current thumbnail

**URL:** https://forum.kirupa.com/t/flash-8-xml-gallery-show-current-thumbnail/245745
**Category:** flash
**Created:** [December 3, 2007, 5:03pm UTC](https://forum.kirupa.com/t/flash-8-xml-gallery-show-current-thumbnail/245745 "2007-12-03T17:03:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![TomNez](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tomnez/32/1674_2.png) [@TomNez](https://forum.kirupa.com/u/TomNez)
#### Post date: [December 3, 2007, 5:03pm UTC](https://forum.kirupa.com/t/flash-8-xml-gallery-show-current-thumbnail/245745/1 "2007-12-03T17:03:42Z")

</div>

Hey all,

I am having trouble making some additions to the tutorial found [here](http://www.kirupa.com/developer/mx2004/thumbnails.htm).

I have the XML gallery with the scrolling thumbnails. I would like to make it so that when you click a thumbnail, not only does the new image load, but the thumbnail you’ve just clicked shows that that is the current image you’re viewing. For example, here is what I have:

1 - all thumbnails load at 25% opacity  
2 - on rollover, they go to 50% opacity  
3 - on rollout, they go back to 25% opacity.

What I want is that when you click one, it goes to 100% and stays there until you click another.

Here’s what I tried:

I made this function

function resetAlpha (){  
target\_mc.enabled = true;  
target\_mc.alpha = 25;  
}

then in the onRelease for the thumbnails, I have:

target\_mc.onRelease = function() {  
resetAlpha();  
this.\_alpha = 100;  
this.enabled = false;  
p = this.pictureValue-1;  
nextImage();  
}

I thought that by doing this it would reset all the thumbs back to 25% opacity, re-enable all of them, but then disable the one that was just clicked and make it 100% opacity. But what is happening is that none of them are resetting and that when I click them, they all stay 100% and disabled. Is there anyone who can shed some light on this problem? I didn’t post all of the source code because you can see it in the tutorial more clearly. I would really appreciate some help if anyone can offer it.

Thanks,  
Tom
