Retrieve goto destination from mc/button

is there anyway to retrieve the command when a movie clip/button is pressed…for example i have a swf that was converted from a pdf page…the goto links in the pdf are converted to goto links in the swf…however, i need to convert those goto commands to geturl, however, i need to retrieve the page number the goto command is calling…

i know this is confusing but to sum it up i need a way to retrieve the command being issued when a movieclip or button is clicked, and call a function if it meets certain parameters…is there a way to do this?