Here is a simple example of what I mean:
private var ex:String="day";
......
closeWindows(ex);
trace(ex);//I would like it to trace "night"
......
//this can be in another class, we assume that the "ex" variable can't be accessed directly
private function closeWindows(context:String):void {
context = "night"
}
Somehow I would need to pass the reference not the value itself to the "closeWindows" method.
Any help it's highly appreciated. Thanks.