Skip to main content
June 25, 2009
Question

LoadVariables Help Please

  • June 25, 2009
  • 1 reply
  • 275 views

Hello, I'm trying something , if someone know whats the problem please help me. Here is my codes;

var f1:String;

_root.loadVariables("results.txt");

trace(f1)

results.txt is like that
&f1=blabla


This trace gives me UNDEFINED
How can i fix it ?

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
June 25, 2009

You should allow a little time for the file to load before trying to use what it contains.

var f1:String;

_root.loadVariables("results.txt");


function traceF1(){
     trace(f1);
}
setTimeout(traceF1, 100);