Assign value returned from a function to a variable
package{
import flash.display.Sprite;
publicclass Main extends Sprite{
public function Main(){
var color:String = getColor();
trace(color); // Displays: Red
}
function getColor():String {
var color:String = "Red";
return color;
color = "Blue";
return color;
}
}
}