# Weird problem with preloader (very basic)

**URL:** <https://forum.kirupa.com/t/weird-problem-with-preloader-very-basic/279869>\
**Category:** flash\
**Created:** [January 20, 2009, 4:56am UTC](https://forum.kirupa.com/t/weird-problem-with-preloader-very-basic/279869 "2009-01-20T04:56:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisLove](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@ChrisLove](https://forum.kirupa.com/u/ChrisLove)\
**Post date:** [January 20, 2009, 4:56am UTC](https://forum.kirupa.com/t/weird-problem-with-preloader-very-basic/279869/1 "2009-01-20T04:56:13Z")

</div>

ok, i have simpley 2 keyframes… and all i want is a basic preloader where the bar expands horizontally…

1 keyframe is the preloader, 2nd keyframe is the content…

heres my code

stop();  
loaderInt = setInterval (Lbar,10)  
function Lbar (){  
if(getBytesLoaded()\>= getBytesTotal()){  
play();  
clearInterval(loaderInt);  
}  
fill\_MC.\_xscale = (getBytesLoaded()/getBytesTotal()\*100);  
}

now when i preview, the loader just pops up, no loading, and theres a few errors…

i am following a tutorial… what am i doing wrong !!!

_here are the errors_

1180: Call to a possibly undefined method getBytesLoaded.  
1180: Call to a possibly undefined method getBytesTotal.  
1120: Access of undefined property loaderInt.  
1180: Call to a possibly undefined method getBytesLoaded.  
1180: Call to a possibly undefined method getBytesTotal.  
1120: Access of undefined property loaderInt.

ty kirupians
