# Change Pointer/Reference

**URL:** <https://forum.kirupa.com/t/change-pointer-reference/271941>\
**Category:** flash\
**Created:** [September 30, 2008, 4:09pm UTC](https://forum.kirupa.com/t/change-pointer-reference/271941 "2008-09-30T16:09:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdolloff](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mdolloff](https://forum.kirupa.com/u/mdolloff)\
**Post date:** [September 30, 2008, 4:09pm UTC](https://forum.kirupa.com/t/change-pointer-reference/271941/1 "2008-09-30T16:09:22Z")

</div>

Hello. I’m new to flex and actionscript and I am trying to figure out if you can change the reference pointer of an object. Basically I have an Object Obj and now I want Obj to point to some new Object I created someplace else. is this possible?

Here is an example of what I want to do…

```auto
var obj:Oject = {x:12,y:15};

function f(a:Object):void{
    var t:Object = {z1:55,z2:67};
    a = t;
}

f(obj);
Alert.show(obj.z1);//should display 55

```

I know this doesn’t work but I am wondering if there is a way to make this work. I’m trying to deal with an event handler that is used to set several different variables it gets from a database so the returns are asynchronous.
