MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference page 491

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

Advertisement

The lockroot.swf file has _
are loaded, each file dumps variables from their
ActionScript on the main Timeline of a FLA document:
this.createEmptyMovieClip("lockroot_mc", this.getNextHighestDepth());
lockroot_mc.loadMovie("lockroot.swf");
this.createEmptyMovieClip("nolockroot_mc", this.getNextHighestDepth());
nolockroot_mc.loadMovie("nolockroot.swf");
function dumpRoot() {
trace("from current SWF file");
for (i in _root) {
trace(" "+i+" -> "+_root[i]);
}
trace("");
}
dumpRoot();
which traces the following information:
from current SWF file
dumpRoot -> [type Function]
$version -> WIN 7,0,19,0
nolockroot_mc -> _level0.nolockroot_mc
lockroot_mc -> _level0.lockroot_mc
from nolockroot.swf
myVar -> 1
i -> lockroot_mc
dumpRoot -> [type Function]
$version -> WIN 7,0,19,0
nolockroot_mc -> _level0.nolockroot_mc
lockroot_mc -> _level0.lockroot_mc
from lockroot.swf
myOtherVar -> 2
myVar -> 1
The file with no
_lockroot
file contains. If you don't have access to the nolockroot.fla, you can use the following
ActionScript added to the main Timeline to change the
FLA document:
this.createEmptyMovieClip("nolockroot_mc", this.getNextHighestDepth());
nolockroot_mc._lockroot = true;
nolockroot_mc.loadMovie("nolockroot.swf");
applied to it, and nolockroot.swf does not. After the files
lockroot
applied also contains all of the other variables that the root SWF
scopes. Place the following
_root
in the preceding main
_lockroot
MovieClip
491

Advertisement

Table of Contents
loading

Table of Contents