# Preloader Problem

**URL:** <https://forum.kirupa.com/t/preloader-problem/94610>\
**Category:** Uncategorized\
**Created:** [November 14, 2003, 3:24pm UTC](https://forum.kirupa.com/t/preloader-problem/94610 "2003-11-14T15:24:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JustinM](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@JustinM](https://forum.kirupa.com/u/JustinM)\
**Post date:** [November 14, 2003, 3:24pm UTC](https://forum.kirupa.com/t/preloader-problem/94610/1 "2003-11-14T15:24:50Z")

</div>

I’m having trouble with a preloader. I’ve gone through many tutorials and they aren’t helping me with this specific issue. I have one movie that generates random snow in frame one. In another layer in this movie, I’m loading a swf into level 1 using LoadMovieNumb("\*\*\*\*.swf", 1); Once this swf loads it plays the movie that was loading automatically. What I’d like to do is add a preloader counting percentage of the swf loaded. I can’t seem to get things arranged correctly and I’ve tried every configuration that I can think of. What I currently have is the loadmovienum command in frame 1. In frame 2 I have the following:

bytes\_loaded = Math.round(\_level1.getBytesLoaded());  
bytes\_total = Math.round(\_level1.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
\_root.mytext.text = Math.round(getPercent\*100)+"%";  
if (bytes\_loaded == bytes\_total) {  
gotoAndPlay(4);  
}

Frame 3 has: gotoAndPlay(2);  
and Frame 4 has: stop();  
It seems to stick at frame 1 until the swf is loaded which negates all of my other code. Any ideas?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 15, 2003, 11:45am UTC](https://forum.kirupa.com/t/preloader-problem/94610/2 "2003-11-15T11:45:46Z")

</div>

> \*Originally posted by claudio \*  
> \*\*Something like this. \*\*

This was of great help to me in constructing my preloader. However there’s on problem I still have. I only want .swf file to play when fully loaded, but I can’t figure out where to add to the script to prevent this from happening. If I add a stop action to the loading .swf then it never plays… any advice?. Any one!.
