Save variable

Hi,
Another question.
I have this onPress function and what I’d like is to save the (snd.position/1000) to a variable so I can recall it at a later time on a keyPress action.
This i swhat I have but the variable is defined locally within the fuction so am I right in thinking that I won’t be able to call it from a keyPress action?

scrubber_mc.onPress = function() {
if (!snd.loaded) {
return (0);
}
var pos = this._xmouse/100;
snd.position = Math.min(snd._sound.duration, pos*snd._sound.duration/snd.loaded);
if (snd.isPlaying) {
snd._sound.start(snd.position/1000);
var posMemory = snd.position/1000;
trace(posMemory);
}
};

Thankyou,
M