Functions in a certain order

Problem:
I want to be able to run functions in a certain order from an array. The code below is a non-fat version of what I want to accomplish. The problem appears when the function(scream_name) runs. Flash makes the passed variables into one variabel; sname = “John”, “Doe” and lname = undefined.

Anyone?


 
function run_func(func,vars){
  func_ready = func(vars);
}
 
function scream_name(sname,lname){
  trace(sname add " " add lname);
  return true;
}
 
functions_ = new Array(
 [ scream_name, ["John","Doe"] ]
)
 
run_func(functions_[0][0],functions_[0][1]);
 

but waht you have already is useful, just a different trace
function run_func(func, vars) {
func_ready = func(vars);
}
function scream_name(name) {
trace(name[0] add " " add name[1]);
return true;
}
functions_ = new Array([scream_name, [“John”, “Doe”]]);
run_func(functions_[0][0], functions_[0][1]);

maybe you could incluse the timeline as well
function run_func(func, vars, obj) {
func_ready = objfunc;
}
function scream_name(name) {
trace(name[0] add " " add name[1]);
return true;
}
functions_ = new Array([“scream_name”, [“John”, “Doe”], root]);
run_func(functions
[0][0], functions_[0][1], functions_[0][2]);

Hmm, that is how I have my code now. I’ll do it like that, even if I really wanted a script wich only passed the correct number of variables needed.

thanks