# Problem with uploader

**URL:** <https://forum.kirupa.com/t/problem-with-uploader/295209>\
**Category:** flash\
**Created:** [August 26, 2009, 5:20pm UTC](https://forum.kirupa.com/t/problem-with-uploader/295209 "2009-08-26T17:20:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![101music](https://avatars.discourse-cdn.com/v4/letter/1/41988e/32.png) [@101music](https://forum.kirupa.com/u/101music)\
**Post date:** [August 26, 2009, 5:20pm UTC](https://forum.kirupa.com/t/problem-with-uploader/295209/1 "2009-08-26T17:20:52Z")

</div>

Hi,

I get this message error when adding a preloader to the movieclip I am working on…

TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at WebCandy\_fla::MainTimeline/frame2()  
at flash.display::MovieClip/nextFrame()  
at WebCandy\_fla::MainTimeline/updatePreloader()

I tested the movie clip with this code and it worked fine:

stop();  
//preloader  
loaderInfo.addEventListener(ProgressEvent.PROGRESS, updatePreloader);

function updatePreloader(evtObj:ProgressEvent):void  
{  
//container for the progress of the site (download)  
var percent:Number = Math.floor((evtObj.bytesLoaded\*100)/evtObj.bytesTotal);  
preloader\_txt.text = percent+"%";

As soon as I added this part it started giving me the error message:

if (percent==100){  
nextFrame();  
}

}

Does anybody know why, I am quiet new to actionscript.

Thank you
