# MovieClip help

**URL:** <https://forum.kirupa.com/t/movieclip-help/271589>\
**Category:** flash\
**Created:** [September 25, 2008, 4:21am UTC](https://forum.kirupa.com/t/movieclip-help/271589 "2008-09-25T04:21:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![playtime021](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@playtime021](https://forum.kirupa.com/u/playtime021)\
**Post date:** [September 25, 2008, 4:21am UTC](https://forum.kirupa.com/t/movieclip-help/271589/1 "2008-09-25T04:21:49Z")

</div>

Hi,

I need to know what I have to do in order to move this line of code off the main timeline and into a movieClip. the code is here:

stop();  
this.onEnterFrame = function(){  
var myLoaded:Number = Math.round(\_root.getBytesLoaded());  
var myTotal:Number = Math.round(\_root.getBytesTotal());  
var myPercent:Number = myLoaded/myTotal \* 100;  
if (myPercent == 100) {  
delete this.onEnterFrame;  
\_root.gotoAndStop(2);  
}  
}

The code works fine whe on the main timeline but, doesn’t work when i place it into a movieClip. can Anyone help me out?------ Play.:doh:
