# Getting apreloader to work from inside a movieclip

**URL:** <https://forum.kirupa.com/t/getting-apreloader-to-work-from-inside-a-movieclip/246699>\
**Category:** flash\
**Created:** [December 13, 2007, 3:56pm UTC](https://forum.kirupa.com/t/getting-apreloader-to-work-from-inside-a-movieclip/246699 "2007-12-13T15:56:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lawrenceging](https://avatars.discourse-cdn.com/v4/letter/l/b77776/32.png) [@lawrenceging](https://forum.kirupa.com/u/lawrenceging)\
**Post date:** [December 13, 2007, 3:56pm UTC](https://forum.kirupa.com/t/getting-apreloader-to-work-from-inside-a-movieclip/246699/1 "2007-12-13T15:56:41Z")

</div>

Hi all,

I have a problem with a preloader on my site. Basically I have a movieclip that contains my preloader on the main timeline. My question is how do I get the preloader to work, despite it being inside a movie clip? At the moment, when I test the movie, it totally bypasses the preloader frames.

I have attached the code that is currently on my preloader.

Any help greatly appreciated.

Cheers

===============stop();

lBytes = getBytesLoaded();  
tBytes = getBytesTotal();

percentLoaded = Math.floor((lBytes/tBytes)\*100);

loader.bar.\_yscale = percentLoaded;

loader.percent.text = percentLoaded + “%”;

if (lBytes\>=tBytes && tBytes\>0) {

if (count\>=12) {  
gotoAndPlay(“start”);

} else {  
count++;  
gotoAndPlay(“preload”);  
}  
} else {  
gotoAndPlay(“preload”);  
}

===============
