Hi
I want to know if there is any way a string can be interpreted as function name.I need this to call functions dynamically.Below is a code snippet which works fine if the function is in the same class as the function call.But what if i want to call a function present in another class or a different library.Any suggestions will be appreciated.
public var actionRef:String = “getit”
public function initApp():void
{
button.label=“Click”
canvas.addChild(button);
button.addEventListener(MouseEvent.CLICK,callMe);
}
public function callMe(event:MouseEvent):void
{
//if (this.hasOwnProperty(actionRef))
this[actionRef]();
}
public function getit():void
{
trace("inside getit")
}
Cheers
mfsiddiq