Targetting movies within a component


Ive been building a portfolio site for a friend, and had a large number of menu buttons which used the createEmptyMovieClip function in order to display individual portfolio items using the following:

var holder = createEmptyMovieClip(“holder”,100);
for (var i = 1; i<=100; i++) {
var btn = this[“btnID”+i]; = i;
btn.onRelease = function() {
_parent._parent.btnPortClose._visible = true;

this worked great, but now, the client has decided that he wants a longer menu which uses a scrollbar. I have placed the movieclip containing the portfolio menu in a scrollbox component which on its own is ok…ish…

the problem:

if you look at the last line of code, you can see that when a portfolio item is loaded, the close button is made visible, which allowed you to close each individual portfolio item.

The close button and its code, live within the movie that the menu origially lived within (it was up one level) - i have been able to make this code show the button (i added the second “_parent” to its target), but i dont seem to be able to get the buttons actionscript to target the portfolio items now…

i would have thought it would be nested within the scrollbox (called “scrollPort”) and then still within the menu movie (“mcPortMenu”) lso the code would be:

btnPortClose._visible = false;

(i have only added the “scrollPort” bit since moving the menu movie inside the scrollbox)

but it just wont work…

the OTHER question :crazy: …

now that the portfolio menu is within a scrollpane, the portfolio images are also opening up within that scrollpane (which is dumb, cos the images are the right side for the window, its only thte menu which is too long for it)… can you see a way of making them open up outside of the scrollpane using the code at top??? or can you somehow lock the scrollbars when the image opens up???

sorry for all the questions… thanks if u can help!:smiley:

let me know if u need the .fla file to see what im rambling on about… although my actionscript probably makes less sense than this post anyhoo…