MC inside of a MC problems

Ok…So Im still a bit of a newb when it comes to AS. I used the Kirupa XML Gallery thumbnail Tutorial for a jumping off point for a gallery I wanted to make. However I tried to change the thumbnail scroller so that it is to the side of the actual picture and that it would scroll up and down instead left to right. When I tested the movie, it appears to work just fine. However, when that swf file is loaded into the larger main movie swf file when its running, the scroller doesnt work. It won’t budge. The “next” and “previous” buttons still work, but the scroller does not.

Can anyone give me a clue as to why that is or if its something I missed?

Thanks,
:huh:

Its an instance targeting problem. If you search the forums, you will find around 6486849523459723609345634985623498547345 million people asking this same question and getting an answer.

Ok…Then why does the original gallery swf file work just when its not being loaded into the main swf file? I mean the thmbnail scroller works how its supposed to when you view the movie by itself. But when its loaded into the main site swf, the invisible scroller is the only thing that stops working.

I looked through probably 100 or more forum posts about instance targeting after your advice, and I couldnt find anyone refering to a MC inside of another MC with a defunct scroller or component. If you can direct me to one I would appreciate it.

becasue there is a new “_root”, the _root of your movie has changed once you load it into another clip.

:ko:

Ok. I guess I never thought of that. So then where would I need to adjust that: in the gallery movie swf or the main movie swf?

the gallery

Yeah…well I can’t find where the heck Im supposed to change that in my gallery code. Below is the code for the thumbnail scroller. Its not the entire code but I figured that was the only part of the movie that was affected so that was all I needed. Can someone help tell me where I need to fix the “_root” issues. I can see them but I am clueless as to how to redirect them.

function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip(“tscroller”, 1000);
scroll_speed = 7;
tscroller.onEnterFrame = function() {
if ((_root._xmouse>=thumbnail_mc._x) && (_root._xmouse<=thumbnail_mc._x+thumbnail_mc._width)) {
if ((_root._ymouse>=(hit_down._y-20)) && (thumbnail_mc.hitTest(hit_down))) {
thumbnail_mc._y -= scroll_speed;
} else if ((_root._ymouse<=(hit_up._y+20)) && (thumbnail_mc.hitTest(hit_up))) {
thumbnail_mc._y += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip(“t”+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._y = hit_up._y+(target_mc._height+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], “thumbnail_mc.t”+k);
}