[FMX2004] Problem with function variables

Hi everyone!
I’ve had a slight problem with this thing I’m trying to make, its basically a map, that loads a XML document, where it says the points of the streets and the name. Well… I have a function, that creates all the streets, wich works just fine. All the streets are located in different movieclips, that are like _root.streets.street0,street1,street2,etc. My problem is that I want to store a Variable in lets say: _root.streets.street1.streetName but, if I put the variable in the function, it erases it when it completes, how would I make it not dissapear? I don’t think making it global would solve my problem…

Hope you can understand my question, if you need anymore information, just explain what you don’t understand and I’ll try to explain better. Thank you all!