I am not quite sure if this is even possible with Flash, but I have done it successfully in other programming languages.
At this point I have a function that is given 2 parameters (object and func) and am wanting to be able to call the object’s function (func) within the function that I have (as to make things simple and even be able to just loop through an array calling each function as I go (dynmically).
Here is my current function:
function doFunc(object, event){
object.event();
}
And I am passing it something like so:
doFunc(test_btn, "doSomething");
where test_btn is a simple button movieclip that has the function doSomething inside of it (like so):
function doSomething(){
trace("Function called successfully");
}
The only issue here is that it doesn’t seem to work out any way I have tried it. If anyone knows what is going on here (or if this is even possible in AS) I would be really thankful.
Thanks in advance, and hopefully this is allowed…