hi,
ny1 got a clue how to call a function with a variable in the name?
e.g.:
function CallMyFunction (cmd) {
eval(cmd);
}
CallMyFunction(“trace(“Hey!”);”);
this doesnt work; but perhaps someone knows how to get this to work.
GuZ
hi,
ny1 got a clue how to call a function with a variable in the name?
e.g.:
function CallMyFunction (cmd) {
eval(cmd);
}
CallMyFunction(“trace(“Hey!”);”);
this doesnt work; but perhaps someone knows how to get this to work.
GuZ
function myFunc(a){
a=a+5;
}
trace (myFunc(5));
// returns 10
Is that what you wanted to know:q:
nope sorry,
i want to make a function that can run any function with a variable:
e.g.:
cmd=“trace(1);”;
eval(cmd);
should result: 1
only it doesnt work.
i need this to make a single function for a timer; so i want to run several functions after a delay, using setInterval(); only the funciton must be runned once, and using setInterval would cause a loop; so i want to use setinterval with a variable to a simple script that runs the variable command, and then clears the interval.
*Originally posted by ilyaslamasse *
**
function myFunc(a){
a=a+5;
}
trace (myFunc(5));
// returns 10
Is that what you wanted to know:q: **
:: Copyright KIRUPA 2024 //--