# Waiting for variables

**URL:** <https://forum.kirupa.com/t/waiting-for-variables/5943>\
**Category:** Uncategorized\
**Created:** [September 26, 2002, 8:12am UTC](https://forum.kirupa.com/t/waiting-for-variables/5943 "2002-09-26T08:12:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![runestar](https://avatars.discourse-cdn.com/v4/letter/r/74df32/32.png) [@runestar](https://forum.kirupa.com/u/runestar)\
**Post date:** [September 26, 2002, 8:12am UTC](https://forum.kirupa.com/t/waiting-for-variables/5943/1 "2002-09-26T08:12:22Z")

</div>

Hello everybody!

Does anyone know if it’s possible to delay the playhead inside a movieclip untill external text files has been fully loaded. I would very much like to do it without using the onClipEvent (data) script. I’m thinking there must be some sort of “if”-statement to do this…

BTW, I’m using Flash 5…

Thanks for a great forum!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 26, 2002, 10:31am UTC](https://forum.kirupa.com/t/waiting-for-variables/5943/2 "2002-09-26T10:31:38Z")

</div>

Append a test variable to the end of your external txt file e.g. “var1=24&var2=3678&eof=true”

then test for it using a conditional loop

Frame 1  
eof=false;  
loadVariablesNum(“externalSource.txt”);

Frame 3  
if (eof==true) {  
gotoAndPlay(“nextBit”)  
} else {  
gotoAndPlay(\_currentFrame-1)  
}

You could also consider adding a timeout clause to reload the variable if the server hasn’t responded within a certain time frame using getTimer()
