Localtoglobal (Movieclip.localtoglobal Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example loads information from a text file called params.txtinto the
movie clip that is created by using
is used to check the loading progress. The script checks for a variable in the params.txt file
named
.
done
this.createEmptyMovieClip("target_mc", this.getNextHighestDepth());
target_mc.loadVariables("params.txt");
function checkParamsLoaded() {
if (target_mc.done == undefined) {
trace("not yet.");
} else {
trace("finished loading. killing interval.");
trace("-------------");
for (i in target_mc) {
trace(i+": "+target_mc[i]);
}
trace("-------------");
clearInterval(param_interval);
}
}
var param_interval = setInterval(checkParamsLoaded, 100);
The params.txt file includes the following text:
var1="hello"&var2="goodbye"&done="done"
See also
loadMovie (MovieClip.loadMovie method)
unloadMovie (MovieClip.unloadMovie method)

localToGlobal (MovieClip.localToGlobal method)

public localToGlobal(pt:Object) : Void
Converts the
object from the movie clip's (local) coordinates to the Stage (global)
pt
coordinates.
The
MovieClip.localToGlobal()
coordinates from values that are relative to the top-left corner of a specific movie clip to values
that are relative to the top-left corner of the Stage.
createEmptyMovieClip()
,
loadVariablesNum function
method allows you to convert any given x and y
target_mc
. The
setInterval()
,
MovieClip
function
487

Advertisement

Table of Contents
loading

Table of Contents