Functions can be held by variables as shown below.
function multiply(x, y) {
return x*y;
}
var theAnswer:Function;
var x:Number = 6;
var y:Number = 7;
theAnswer = multiply(x, y);
trace(theAnswer);//42
Functions can be held by variables as shown below.
function multiply(x, y) {
return x*y;
}
var theAnswer:Function;
var x:Number = 6;
var y:Number = 7;
theAnswer = multiply(x, y);
trace(theAnswer);//42