# MovieClipLoader & \_lockroot makes me angry

**URL:** https://forum.kirupa.com/t/moviecliploader--lockroot-makes-me-angry/194704
**Category:** flash
**Created:** [July 25, 2006, 6:23pm UTC](https://forum.kirupa.com/t/moviecliploader--lockroot-makes-me-angry/194704 "2006-07-25T18:23:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![slashripshred](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@slashripshred](https://forum.kirupa.com/u/slashripshred)
#### Post date: [July 25, 2006, 6:23pm UTC](https://forum.kirupa.com/t/moviecliploader--lockroot-makes-me-angry/194704/1 "2006-07-25T18:23:04Z")

</div>

I’ve come across a rather strange problem with the MovieClipLoader - I have an actionscript file, which simply creates an empty movie clip on the root and loads a movie into it. The root of the movie clip is locked before the swf is loaded.

class loader {  
public function loader(n:Number) {  
var loader\_clip = _root.createEmptyMovieClip("test_" + n, n);  
loader\_clip.\_lockroot = true;  
var loaderListener = new Object();  
var loadertest = new MovieClipLoader();  
loadertest.loadClip(“Circle.swf”, loader\_clip);  
}  
}

All i have for code in my .fla is this :  
var one = new loader(1);  
var two = new loader(2);

and all I have for code in my loaded Circle.swf is  
trace(\_root);

Unfortunately, for some reason MovieClipLoader assigns the same root to both clips! For example, when I run my .fla, i get this as a trace:

\_level0.test\_2  
\_level0.test\_2

when i SHOULD get

\_level0.test\_1  
\_level0.test\_2

I have absolutely no idea why moviecliploader would act this way…i need to load the same movie multiple times and it has dynamic content, so I need \_lockroot to work…any ideas?
