# Trouble using setters

**URL:** <https://forum.kirupa.com/t/trouble-using-setters/306345>\
**Category:** Uncategorized\
**Created:** [March 13, 2010, 3:05pm UTC](https://forum.kirupa.com/t/trouble-using-setters/306345 "2010-03-13T15:05:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![whiteart](https://avatars.discourse-cdn.com/v4/letter/w/c67d28/32.png) [@whiteart](https://forum.kirupa.com/u/whiteart)\
**Post date:** [March 13, 2010, 3:05pm UTC](https://forum.kirupa.com/t/trouble-using-setters/306345/1 "2010-03-13T15:05:16Z")

</div>

I’m starting out in AS3 and have hit a wall with using setters

I’ve set up my main movie clip. It has two mc’s on the stage both with externally defined classes. The first mc ‘Bank’ has this code;

package  
{

```
import flash.display.MovieClip;

public class Bank extends MovieClip
{    
    private var _clientAccountValue = 0;
    
    public static function set deposit(money:int):void
    {
        if(money &gt; 0)
        {
            _clientAccountValue += money;
            trace(_clientAccountValue);
        }
    }
}

```

}

The second mc ‘Client’ has the following;

package  
{

```
import flash.display.MovieClip;

public class Client extends MovieClip
{    
    private var _checkValue = 10000;
    
    public function Client():void
    {
        Bank.deposit = _checkValue;
    }
}

```

}

The idea being the Client function sends the updated total to the Bank.deposit function. But I get this error: 1120: Access of undefined property \_clientAccountValue.
