Using a variable - Basic Q

[font=verdana, arial, helvetica][size=2][color=#4f5044]Hi,

Firstly, thanks for reading. I don’t know what I’d do without this forum. It is a blessing to say the least.

Anyways, I am relatively new to actionscript and am trying to understand a couple of fundamentals. The main one being-

** What happens to a variable that is loaded into an MC but isn’t connected to a text box of any sort?**
How can I reference this variable?

I have an MC which loads some variables from a text file into several duplicated MCs on the stage. This works fine, however each duplicated MC has a button in it which I would like to get a new URL in a blank window based on a variable called ‘u’ located in the corresponding text file.

To this end, I have attached the following code to the button (granted it’s probably not the best way to do it)-

[indent][font=verdana, arial, helvetica][size=1][color=#4f5044]code:[/color][/size][/font]on (release) {
getURL (“http://www.” add u, “_blank”);
[/indent][font=verdana, arial, helvetica][size=2][color=#4f5044]

I have tested it by declaring the variable and it’s value in the first frame of the MC and it works fine but as soon as I delete this declaration so that it will use the value from variable ‘u’ in the text file but it fails.

Can anyone shed any light on this? I would be most appreciative.

Thanks in advance,