# TypeError: Error #1006: set is not a function

**URL:** https://forum.kirupa.com/t/typeerror-error-1006-set-is-not-a-function/309704
**Category:** flash
**Created:** [May 21, 2010, 9:00pm UTC](https://forum.kirupa.com/t/typeerror-error-1006-set-is-not-a-function/309704 "2010-05-21T21:00:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Dimitree](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dimitree/32/2530_2.png) [@Dimitree](https://forum.kirupa.com/u/Dimitree)
#### Post date: [May 21, 2010, 9:00pm UTC](https://forum.kirupa.com/t/typeerror-error-1006-set-is-not-a-function/309704/1 "2010-05-21T21:00:34Z")

</div>

I have a “setter” function in a class

```php

public function set(date:Date):void {
    _targetDate = date; //...etc

```

When I try to access this from my Document class by this syntax:

```php

var targetDate:Date = new Date();
targetDate.setTime( Date.UTC(2010, 4, 28, 20, 00) );
clock.set(targetDate);// where clock is instance name of a MovieClip placed on stage

```

- I get this: TypeError: Error # **1006** : set is not a function.

I don’t have any clue what’s going wrong
