# \[MX2004\] External Txt Vars and &amp

**URL:** <https://forum.kirupa.com/t/mx2004-external-txt-vars-and-amp/87800>\
**Category:** flash\
**Created:** [April 24, 2005, 1:31am UTC](https://forum.kirupa.com/t/mx2004-external-txt-vars-and-amp/87800 "2005-04-24T01:31:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kBisk](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kBisk](https://forum.kirupa.com/u/kBisk)\
**Post date:** [April 24, 2005, 1:31am UTC](https://forum.kirupa.com/t/mx2004-external-txt-vars-and-amp/87800/1 "2005-04-24T01:31:46Z")

</div>

I’m importing external vars using loadVariablesNum() from .txt files. I know that each variable must be surrounded by amperstands (&) in order define the start and end of each variable.

ie:

```auto

&var_1=abc&
&var_2=xyz&

```

And then I want to use something like:  
[AS]mc.gotoAndPlay(\_level#.var\_1);[/AS]

But my question is (for simplicity), is there a way to do this if the amperstand at the end is not included, such as:

ie:

```auto

&var_1=abc
&var_2=xyz

```

Flash returns the first variable above as var\_01="abc  
" which is understandable since it was not closed properly. However, I want to be able to use the gotoAndPlay(); with var\_01="abc  
". I have tried labelling the frame with abc  
, but that didn’t work.

I also tried using frame\_array = new Array(\_level#.var\_1.split("\r")); and then said gotoAndPlay(frame\_array[0]); but for some reason I couldn’t get this to work either…

Any suggestions? Thanks.
