# loadMovie Hierarchy Problem

**URL:** <https://forum.kirupa.com/t/loadmovie-hierarchy-problem/213062>\
**Category:** flash\
**Created:** [January 16, 2007, 6:22pm UTC](https://forum.kirupa.com/t/loadmovie-hierarchy-problem/213062 "2007-01-16T18:22:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fargate](https://avatars.discourse-cdn.com/v4/letter/f/dbc845/32.png) [@Fargate](https://forum.kirupa.com/u/Fargate)\
**Post date:** [January 16, 2007, 6:22pm UTC](https://forum.kirupa.com/t/loadmovie-hierarchy-problem/213062/1 "2007-01-16T18:22:08Z")

</div>

[AS]  
\_root.onEnterFrame = function() {  
if (this.\_currentframe == 2) {  
\_root.prevButton.\_alpha = 30;  
} else if (this.\_currentframe == 9) {  
\_root.prevButton.\_alpha = 30;  
} else {  
\_root.prevButton.\_alpha = 100;  
}  
if (this.\_currentframe == 8) {  
\_root.nextButton.\_alpha = 30;  
} else {  
\_root.nextButton.\_alpha = 100;  
}  
\_root.frameCount = (\_root.\_currentframe-1)+"/"+(\_root.\_totalframes-3);  
};  
[/AS]

I have the following code in the main timeline of a movie. This script works perfectly as is, given that I am not using loadMovie and am directly viewing the movie from the fla. However when I try to use loadMovie to load the swf into an empty movie clip in a different movie, it no longer works. I assume this is because I am missing a \_root or \_parent somewhere. Could anyone tell me what exactly I am missing, what I need to modify in order for the script to work with loadMovie?

Thanks,

Fargate
