# XML Gallery

**URL:** <https://forum.kirupa.com/t/xml-gallery/250334>\
**Category:** Uncategorized\
**Created:** [January 28, 2008, 5:00pm UTC](https://forum.kirupa.com/t/xml-gallery/250334 "2008-01-28T17:00:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adw999](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@adw999](https://forum.kirupa.com/u/adw999)\
**Post date:** [January 28, 2008, 5:00pm UTC](https://forum.kirupa.com/t/xml-gallery/250334/1 "2008-01-28T17:00:35Z")

</div>

Hi following the XML Gallery tutorial i’ve setup a small gallery. However, i want to use the gallery inside a another mc (named ‘gallery’). It loads fine etc but the scrolling doesnt work. I have two example…

This example has the right scrolling working but doesn’t stop on mouse out. Left scrolling doesn’t work at all (look for the relative paths):

```auto
function thumbNailScroller() {
 this.createEmptyMovieClip("tscroller", 1000);
 scroll_speed = 10;
 tscroller.onEnterFrame = function() {
  if ((_root._ymouse>=this.thumbnail_mc._y) && (_root._ymouse<=this.thumbnail_mc._y+this.thumbnail_mc._height)) {
   if ((_root._xmouse>=(_root.gallery.thumbnail_mc.hit_right._x-40)) && (_root.gallery.thumbnail_mc.hitTest(hit_right))) {
    _root.gallery.thumbnail_mc._x -= scroll_speed;
   } else if ((_root._xmouse<=(_root.gallery.thumbnail_mc.hit_left._x+40)) && (_root.gallery.thumbnail_mc.hitTest(hit_left))) {
    this.gallery.thumbnail_mc._x += scroll_speed;
   }
  } else {
   delete tscroller.onEnterFrame;
  }
 };
}

```

This example means the scrolling doesn’t work at all (absolute paths):

```auto
function thumbNailScroller() {
 this.createEmptyMovieClip("tscroller", 1000);
 scroll_speed = 10;
 tscroller.onEnterFrame = function() {
  if ((_root._ymouse>=_root.gallery.thumbnail_mc._y) && (_root._ymouse<=_root.gallery.thumbnail_mc._y+_root.gallery.thumbnail_mc._height)) {
   if ((_root._xmouse>=(_root.gallery.thumbnail_mc.hit_right._x-40)) && (_root.gallery.thumbnail_mc.hitTest(hit_right))) {
    _root.gallery.thumbnail_mc._x -= scroll_speed;
   } else if ((_root._xmouse<=(_root.gallery.thumbnail_mc.hit_left._x+40)) && (_root.gallery.thumbnail_mc.hitTest(hit_left))) {
    this.gallery.thumbnail_mc._x += scroll_speed;
   }
  } else {
   delete tscroller.onEnterFrame;
  }
 };
}

```

any ideas why? thanks
