PDA

View Full Version : waiting for variables...



runestar
September 26th, 2002, 05:12 AM
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!

jsk
September 26th, 2002, 07:31 AM
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()