hi,
im not sure does the as2lib solution can help here but ,,,
say, i have this two methods in my class which extends MovieClip, and i want to be able to set and GET the onRelease handler on runt time. Most important i wont to set it, based on the current function Name assigend to the onRelease, so i need tho know/get the name of the function witch is currently assigned to the onrelease.
Can ReflectionUtil help?
public function setOnRelease(func:Function):Void {
this.onRelease = func;
}
public function getOnRelease():Function {
//HOW To GET THE NAME OF THE FUNCTION CURRENTLY ASSIGNED TO onRelease
trace(this.onRelease._name);
return this.onRelease;
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi,
im not sure does the as2lib solution can help here but ,,,
say, i have this two methods in my class which extends MovieClip, and i want to be able to set and GET the onRelease handler on runt time. Most important i wont to set it, based on the current function Name assigend to the onRelease, so i need tho know/get the name of the function witch is currently assigned to the onrelease.
Can ReflectionUtil help?
public function setOnRelease(func:Function):Void {
this.onRelease = func;
}
public function getOnRelease():Function {
//HOW To GET THE NAME OF THE FUNCTION CURRENTLY ASSIGNED TO onRelease
trace(this.onRelease._name);
return this.onRelease;
}
sorry i found the solution :)
trace(ReflectUtil.getMethodName(this.onRelease, this));