[Flash 8, AS 2] Variables by reference. Stupid language question

Coming from C++ background, I am dumbed by this language…

How can I pass parameters by reference? So it doesn’t make a copy out of it, but modifies whatever I pass in?


function ChangeString(string:String)
string = “inside string”;

var str:String = “outside string”;

outputs “outside string”, since functions seem to take objects by value.

So what do you guys do if you need to get multiple variables out of functions? Returning a custom class? There must be a better way!