tototototototot

All posts tagged function reference

Call a function by its name in AS3

Imagine you want to call a function but you don’t have its reference, only its name. Well everything in ActionScript 3 follows pretty much the same logic. Every member of an object can be accessed via object[“member_name”]; Now it should be easy to get a function from it: [sourcecode language=’as3′] var f:Function = object[“function_name”] as […]