# Preloader problem :(

**URL:** <https://forum.kirupa.com/t/preloader-problem/232066>\
**Category:** Uncategorized\
**Created:** [July 11, 2007, 1:46am UTC](https://forum.kirupa.com/t/preloader-problem/232066 "2007-07-11T01:46:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![onineX](https://avatars.discourse-cdn.com/v4/letter/o/ac91a4/32.png) [@onineX](https://forum.kirupa.com/u/onineX)\
**Post date:** [July 11, 2007, 1:46am UTC](https://forum.kirupa.com/t/preloader-problem/232066/1 "2007-07-11T01:46:47Z")

</div>

i am really pissed off with a problem that i just can’t figure how to make it work. i am working on a flash website and wanted to put a flash hit counter so i could check how many folks visited my site. so i decided to load the hit counter movie as a separated swf file into a container(movie clip)

> loadMovie (“hit\_counter.swf”,“container”);  
> now here’s my problem, whenever i add this code on the 2nd frame(after the preloader is done loading), the movie loops and plays frame 1 and 2 over and over again, i got my hit counter swf loaded in the container BUT the movie repeats itself even if i put the code stop(); on the 2nd frame. i also tried putting both frames 1 and 2 the stop(); code but it keeps on looping.

here is my preloader code

> 

onClipEvent (load)  
{  
total = \_parent.getBytesTotal();  
}  
onClipEvent (enterFrame)  
{  
loaded = \_parent.getBytesLoaded();  
percent = int(loaded / total \* 100);  
\_root.loade.P =percent + “%”;  
gotoAndStop(percent);  
if (loaded == total)  
{  
\_parent.gotoAndStop(2);

;  
} // end if  
}

Hope you can help me guys. Thanks
