AS string to var name

Hi guys,

Another quick question. Is there any way that you can pass a string to a function and use its value as the variable name you wish to change. For example.


var text:String = "Goodbye World";

function myfunction ( varToChange)
{
    varToChange = "Hello World";
}

myfunction("text")