# Adding Thumbnails to XML Gallery Problem

**URL:** <https://forum.kirupa.com/t/adding-thumbnails-to-xml-gallery-problem/194977>\
**Category:** Uncategorized\
**Created:** [July 27, 2006, 3:58pm UTC](https://forum.kirupa.com/t/adding-thumbnails-to-xml-gallery-problem/194977 "2006-07-27T15:58:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![swestre](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@swestre](https://forum.kirupa.com/u/swestre)\
**Post date:** [July 27, 2006, 3:58pm UTC](https://forum.kirupa.com/t/adding-thumbnails-to-xml-gallery-problem/194977/1 "2006-07-27T15:58:48Z")

</div>

So I finished the tutorial on Adding Thumbnails to the XML Photo Gallery. Everything works perfectly. I then went to another flash file, created a container that would load the XML Gallery into it and that worked. My problem: When i put the mouse over any part of the scroll part it’ll scroll to the left, but when i want it to scroll back to the right, hit area in which i have to put the mouse over is WAY OFF to the left side. whats going on? I looked through the action script and tryed messing with the following codes and changing the -40 and +40 to see if that would effect anything and it made the hit areas move but then the whole scroller would shake back and forth. in other words… I have NO IDEA what i’m doing. Please help! :huh:

// thumbnail code!  
this.createEmptyMovieClip(“tscroller”, 1000);  
scroll\_speed = 10;  
tscroller.onEnterFrame = function() {  
if ((\_root.\_ymouse\>=thumbnail\_mc.\_y) && (\_root.\_ymouse\<=thumbnail\_mc.\_y+thumbnail\_mc.\_height)) {  
if ((\_root.\_xmouse\>=(hit\_right.\_x-40)) && (thumbnail\_mc.hitTest(hit\_right))) {  
thumbnail\_mc.\_x -= scroll\_speed;  
} else if ((\_root.\_xmouse\<=40) && (thumbnail\_mc.hitTest(hit\_left))) {  
thumbnail\_mc.\_x += scroll\_speed;  
}  
} else {  
delete tscroller.onEnterFrame;  
}
