Question
A question about _lockroot
The parent movie "test.fla" is empty with follow actionscript
code in timeline:
stop();
var tc = new TestClass(); //the wanted result is "_level0"
var myTest = _root.createEmptyMovieClip("myTestMovie", _root.getNextHighestDepth());
myTest.loadMovie("TestChild.swf");
===================================
The TestClass.as is :
class TestClass
{
function TestClass()
{
trace("Current root is : " + _root);
}
}
===================================
The TestChild.fla is empty with follow actionscript code in timeline:
stop();
this._lockroot = true;
var tc = new TestClass(); //the wanted result is "_level0.myTestMovie"
===================================================
But the result is :
_level0
_level0
===================================================
when I change the code in test.fla into the following:
stop();
//var tc = new TestClass();
var myTest = _root.createEmptyMovieClip("myTestMovie", _root.getNextHighestDepth());
myTest.loadMovie("TestChild.swf");
----------------------------
The result is correct :
_level0.myTestMovie
====================================================
Why? And how to do?
Help me!
stop();
var tc = new TestClass(); //the wanted result is "_level0"
var myTest = _root.createEmptyMovieClip("myTestMovie", _root.getNextHighestDepth());
myTest.loadMovie("TestChild.swf");
===================================
The TestClass.as is :
class TestClass
{
function TestClass()
{
trace("Current root is : " + _root);
}
}
===================================
The TestChild.fla is empty with follow actionscript code in timeline:
stop();
this._lockroot = true;
var tc = new TestClass(); //the wanted result is "_level0.myTestMovie"
===================================================
But the result is :
_level0
_level0
===================================================
when I change the code in test.fla into the following:
stop();
//var tc = new TestClass();
var myTest = _root.createEmptyMovieClip("myTestMovie", _root.getNextHighestDepth());
myTest.loadMovie("TestChild.swf");
----------------------------
The result is correct :
_level0.myTestMovie
====================================================
Why? And how to do?
Help me!