# Preloading

**URL:** <https://forum.kirupa.com/t/preloading/213635>\
**Category:** Uncategorized\
**Created:** [January 21, 2007, 9:48pm UTC](https://forum.kirupa.com/t/preloading/213635 "2007-01-21T21:48:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenisfam](https://avatars.discourse-cdn.com/v4/letter/k/b9bd4f/32.png) [@kenisfam](https://forum.kirupa.com/u/kenisfam)\
**Post date:** [January 21, 2007, 9:48pm UTC](https://forum.kirupa.com/t/preloading/213635/1 "2007-01-21T21:48:09Z")

</div>

Hi im trying to add a preloader to my “thingy”.

But i think i do it wrong as i cannot see any text i should been seeing.  
when i trace it it does work as in the number sais 100 every time

my code

```auto
 
function LoadPicInMovie (thepic ,wherein)
{

   var totalbytes = wherein.getBytesTotal();
   var loadedbytes = wherein.getBytesLoaded();
  var percentloaded = Math.ceil((loadedbytes/totalbytes)*100);
  trace(percentloaded);
  //wherein.preloadertxt.visible = true;
   wherein.preloadertxt.text ="% " + percentloaded;
  if (percentloaded == 100)
  {
 // wherein.preloadertxt.visible = false;
  wherein.loadMovie(thepic);
}
}  

```
