MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference page 379

Actionscript language reference
Table of Contents

Advertisement

If you want to load variables into a target MovieClip, use
loadVariablesNum()
Example
The following example loads information from a text file called params.txt into the main
Timeline of the SWF at level 2 in Flash Player. The variable names of the text fields must match
the variable names in the params.txt file. The
progress of the data being loaded into the SWF. The script checks for a variable in the params.txt
file named
.
done
loadVariablesNum("params.txt", 2);
function checkParamsLoaded() {
if (_level2.done == undefined) {
trace("not yet.");
} else {
trace("finished loading. killing interval.");
trace("-------------");
for (i in _level2) {
trace(i+": "+_level2[i]);
}
trace("-------------");
clearInterval(param_interval);
}
}
var param_interval = setInterval(checkParamsLoaded, 100);
// Params.txt includes the following text
var1="hello"&var2="goodbye"&done="done"
See also
getURL(), loadMovie(), loadMovieNum(), loadVariables(), MovieClip.loadMovie(),
MovieClip.loadVariables(),
.
LoadVars.load()
loadVariables()
function is used to check the
setInterval()
instead of
loadVariablesNum()
379

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents