Search code examples
flashactionscript-3actionscriptflash-cs4

Check to see if a class has a method


Is it possible to check a class to see whether it has a method or not ? Or even a particular property


Solution

  • var target:Object;// = some object
    var name:String;// = some name
    if(name in target){
        // if property/method exists
    }else{
        // if property/method not exists
    }