Call a function in a mc (?)

Hello everyone.

I have followed this tutorial

http://flashexplained.com/actionscript/making-the-ultimate-dynamic-image-gallery-in-flash-8/

and all goes fine: gallery works like a charm.

But i need to add a dynamic “download pdf” button for each gallery.

I’ve been able to associate a pdf every time i clicked a gallery button adding this line to the frame code on the root
geturl(“http://www.mysite.com/” + whichGallery + “.pdf”);
into “function enableButtons(numberOfGalleries:Number):Void {”
but if i create a custom button to click for download the result is “undefined”.

I think this happen because i need to call the above function… :frowning:
Really need this for a customer. Nobody seems to solve this (or even try), this is my last chance.
Anyone please, please can help me?

Thanks in advance.