views:

38

answers:

1

I have taken variable in one function and want to use that value in another function. Please give me example...

A: 

I have not quite understand you pb, but return you variable from the function and pass it as a parameter to the another function.

function foo():String {
 var tmp:String="hello";
 //...
 return tmp;
}

function bar(value:String):void{
 //...
 trace(value); // will trace "hello"
}

var str:String=foo();
bar(str);

// or

bar( foo() );
Patrick
hi patrick, I have posted detailed program, Please go through and suggest:Question: Making a custom glossarytags: flash, flex
mukherjeerimi
Added an answer to your previous question
Patrick