Revision: 39046
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 12, 2011 19:53 by jayarjo
Initial Code
private function methodExists(methodName:String) : Boolean
{
var exists:Boolean;
try {
exists = this[methodName] != null;
} catch (e:Error) {
exists = false;
}
return exists;
}
Initial URL
Initial Description
Just add a method like this in a Class that needs to call methods dynamically, without a prior knowledge of whether they exist or not.
Initial Title
Test if class method exists in Action Script
Initial Tags
class
Initial Language
ActionScript 3