TypeError: Error #1006: set is not a function

I have a “setter” function in a class


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


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


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