Get name of jpg inside mc?

Okay the subject line was ambiguous but hopefully this description is not! :slight_smile:

I have a bunch of buttons. When you click on a button it dynamically loads a jpg into a holder movie clip. I have a button next to the holder movie clip that says “enlarge photo”. I would like the user to be able to click on the enlarge photo button and have whatever image happens to be in the small viewer at the time load into a larger viewer. Obviously I would be loading a different sized image but what I want to know is - how can I grab the name of the photo that was loaded into the small viewer when one button was pressed so that I can load the corresponding larger photo when the enlarge button is pressed? Should I store the name in a variable at the time the particular photo button is pressed and then pass that variable when the enlarge photo button is pressed?

Does this make any sense? :huh:

Thanks for any help!

Sure!

The code from the individual buttons to the little holder is:
[AS]
on(release){
_root.MC1.viewer.loadMovie(“photos/smallphoto3.jpg”);
}
[/AS]

Where viewer is the small version empty movie cip. Then on MC1 next to the viewer is the EnlargePhoto button that would do something like
[AS]
on(release){
_root.holder._visible = true;
_root.holder.clip.loadMovie(“photos/bigphoto3.jpg”);
}
[/AS]

I have the big photo loading into a draggble movie clip - hence holder then clip.

:slight_smile:

So I ended up storing the name of the big pic inside a global variable and then used that global variable when the EnlargePhoto button is pressed. Is that a good way to do it or is there a better way? Just trying to improve my AS skills here.

Thanks for any input!