How to get the class instance of a method

Hi guys,

My first post on kirupa.

Is there a way to get the class instance
(meaning “aMenuInstance” inside SomeClass) from the passed method “load”
_scope inside Task should be the “aMenuInstance” from SomeClass.


 public class Task extends EventDispatcher
 {
  private var _scope:Object;
  private var _method:Function;
  private var _evt:String;
 
  public function Task(method:Function, evt:String = "") 
  {
[COLOR=seagreen]   // _scope would need to be _aMenuInstance[/COLOR]
   [COLOR=red]_scope = method.some_magical_undocumented_function_or_something;[/COLOR]
   _method = method;
   _evt = evt;
  }
  .....
 }


 public class SomeClass
 {
   private var _aMenuInstance:SomeMenuClass;
 
   public function SomeClass ()
   {
    _aMenuInstance = new SomeMenuClass();
    var aTask:Task = new Task(_aMenuInstance.load, "menuLoaded");
   }
 }

any ideas?