Detecting url of the page where swf is

I need to use the same flash menu for 2 different languajes.
The swf menu are just buttons with photos but is there a small
text that should reflect the current page languaje

IE:

index.htm should have menu.swf in english
but index_spanish.htm should have menu.swf and show only the texts
in spanish.

I though just using dynamic txt fields with a var name “lang” to set
the text to “buttonname” or “nombredeboton” depending on what page
the swf is located.

So what I need is a method to swf detect whether the page is english or
spanish (perhaps based on browser url?) that way I could use just one swf
file for both languages.

Any ideas?