# Problem with external variables

**URL:** <https://forum.kirupa.com/t/problem-with-external-variables/134851>\
**Category:** Uncategorized\
**Created:** [January 22, 2005, 2:34am UTC](https://forum.kirupa.com/t/problem-with-external-variables/134851 "2005-01-22T02:34:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmartino](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@nmartino](https://forum.kirupa.com/u/nmartino)\
**Post date:** [January 22, 2005, 2:34am UTC](https://forum.kirupa.com/t/problem-with-external-variables/134851/1 "2005-01-22T02:34:01Z")

</div>

Hello,

I have a flash movie that is loading external variables from a TXT file.  
That TXT defines the vasriables like this: **[color=darkorange]clip1=yes&clip2=no&clip3=yes[/color]**.  
In the main flash movie I have this actionscript:

[color=black] **frame number 1:** [/color] **[color=darkorange]\_root.loadVariables(“variables.txt”);[/color]**

**frame number 2:**

**[color=darkorange]stop();[/color]**  
**[color=darkorange]if (\_root.clip1==“yes”) {  
loadMovieNum(“clip1.swf”, 1);  
}  
if (\_root.clip1==“no”) {  
gotoAndStop(3);  
}[/color]**

**frame number 3:**

**[color=darkorange]stop();[/color]**  
**[color=darkorange]if (\_root.clip2==“yes”) {  
loadMovieNum(“clip2.swf”, 1);  
}  
if (\_root.clip2==“no”) {  
gotoAndStop(4);  
}[/color]**

frame number 3:

**[color=darkorange]stop();[/color]**  
**[color=darkorange]if (\_root.clip3==“yes”) {  
loadMovieNum(“clip3.swf”, 1);  
}  
if (\_root.clip3==“no”) {  
gotoAndStop(1);  
}[/color]**

My objective is to play **clip1.swf** and **clip2.swf** in the main movie defining that through my variables.txt document.

Can you help me…pleaseeeeeeeeeee…:d:

Thank you.:-/
