Returning a value from a function

well I have a function in my index.swf that goes like this

function getLanguage(language):String {
var sLang:String = language;
return sLang;

and I have an external swf that gives a value to language when a button is pressed


my question is how can I make other external swfs get the value of sLang?

I’ve tried doing

if (_root.getLanguage() == "eng") { //obviously that returns undefined
//also tried _root.getLanguage == "eng" but that doesn't return anything