Help passing a variable to global function in another mc

After having recently just discovered the delights of actionscript, I am at a loss to work this out. I’ll explain:

I have a series of buttons which, when each one is clicked, need to grab their instance name (this._name), strip the first three characters from it and send it to a global function in another mc within the swf.

Instead of stripping the characters, I am happy to do:

if (this._name == dot1) {
dotVar = 1;
} else {
if (this._name == dot2) {
dotVar = 2;
} etc…

but it would be nice to do things properly. Told you I was noobish-beyond-compare.

The problem I am having is sending the dotVar value to the global function. I just don;t know how to do it and I have scoured the forums. Unfortunately, I don’t really know what I am searching for.

Thanks

Mat