creationComplete="foo()">
[Bindable]
private var answer:String;
private function foo () : Function {
var x:int = int(ti1.text);
function rectArea(y:int) : int {
return x * y
}
return rectArea;
}
private function bar () : void {
var myProduct:Function = foo();
answer = myProduct(int(ti2.text));
}