Calling different methods in class instances

Is there a way to call different methods from different class instances in 3rd class? I know it sounds confusing, but I’ll try to explain what i want (:

I have 2 classes:


package {
    public dynamic class Box {
        
        public function Box() {
                Content.update(this);
            }
        }
        public function changeBox(changeValue:Number):void {
        }
    }
}

…and:


package {
    public dynamic class Cylinder {
        
        public function Cylinder() {
                Content.update(this);
            }
        }
        public function changeCylinder(changeValue:Number):void {
        }
    }
}

…also there is a 3rd class that’s updating/calculating some stuff…


package {
    public class Content {
        public static function update(object:*):void {
            // calculate stuff...
            // 
            // when done, call method changeBox or changeCylinder  
            // and pass result of calculation
        }
    }
}

So i need a way to call *changeBox or changeCylinder *methods, depending on ‘who’ asked for update…

I’ve tried several things: passing method name as argument, referencing method through public static dict: Dictionary in Content class, but can’t find a way that works… Also setting return type of Content.update function to Number and passing result that way isn’t solution - real example is little more complicated (: I believe function call() & apply() methods are what i really need, but can’t figure out how to use them :expressionless:

Any ideas?