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):
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):
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