all groups > flash actionscript > april 2004 >
You're in the

flash actionscript

group:

problems with lockroot



problems with lockroot FarleyC
4/18/2004 6:11:57 PM
flash actionscript: I have a movieclip I want to dynamically duplicate. I have it working fine. But
if I load the movie into another it fails. I assumed it was that the _root
references were now pointing to the main movie not the onlaoded. so I put in a
this.lockroot = true statement. still it does not work when loaded into another
movie.

Any help would be greatly appreciated... My code is below..

Thanks in advance
Farley

lockroot = true;
loadListener = new Object();
ds.addEventListener("afterLoaded", loadListener);


loadListener.afterLoaded = function (eventObj) {
var galleryNumber =1;
var galleryName = "";
if (String(eventObj.target).indexOf("ds") > -1) {
ds.first();
while (ds.hasNext()) {
galleryName = "galleryMC"+galleryNumber;
galleryMC.duplicateMovieClip(galleryName,galleryNumber);
_root[galleryName]._x = 20;
_root[galleryName]._y = 20 + (galleryNumber++ * 25);
_root[galleryName].titlefield = ds.currentItem.galleryName;
trace(_root[galleryName]._x);
ds.next();
}
}
}
Re: problems with lockroot kglad
4/18/2004 7:57:00 PM
Re: problems with lockroot FarleyC
4/18/2004 10:37:55 PM
Re: problems with lockroot kglad
4/18/2004 10:54:26 PM
AddThis Social Bookmark Button