Get var reference to instance of class from within

:m:

Ok, so basically I want to retrieve the var reference of an instance of a class from within the class. For example:

ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#000000]**var**[/COLOR] ref:MyClass = [COLOR=#000000]**new**[/COLOR] MyClass [COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];

[COLOR=#808080]//then via some method, I would like to get the var ref inside the class[/COLOR]
ref.[COLOR=#000080]getRef[/COLOR]COLOR=#000000[/COLOR]; [COLOR=#808080]//returns “ref” instead of [object Object][/COLOR]
[COLOR=#808080]//[/COLOR]
[COLOR=#808080]// or maybe even this[/COLOR]
[COLOR=#808080]//[/COLOR]
[COLOR=#000000]var[/COLOR] ref:ClassA = [COLOR=#000000]new[/COLOR] ClassA COLOR=#000000[/COLOR];
[COLOR=#000000]var[/COLOR] mgr:ClassB = [COLOR=#000000]new[/COLOR] ClassB COLOR=#000000[/COLOR];
mgr.[COLOR=#000080]instance_array[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR] = ref;
mgr.[COLOR=#000080]getInstances[/COLOR]COLOR=#000000[/COLOR]; [COLOR=#808080]*//returns “ref” instead of [object Object] *[/COLOR]

[/LEFT]
[/FONT]

You may ask why, well I want to do some spring cleaning inside this manager class I am making. Of course the above is a simplistic version of what I am trying to do.

:chinaman: