Variables lost from one Function to another

Hi

I have this function:

function create(e:Event):void 
{
	flashmo_xml = XML(e.target.data);
	text = (flashmo_xml.thumbnail*.@text.toString() );

		
}
trace (text);

the trace is showing nothing. It only works if i put the trace into the function create.

is there a way of getting that variable without doing that?

Thanks