# Preloader problem

**URL:** <https://forum.kirupa.com/t/preloader-problem/24277>\
**Category:** Uncategorized\
**Created:** [June 28, 2003, 4:58am UTC](https://forum.kirupa.com/t/preloader-problem/24277 "2003-06-28T04:58:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chemicalPie](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@chemicalPie](https://forum.kirupa.com/u/chemicalPie)\
**Post date:** [June 28, 2003, 4:58am UTC](https://forum.kirupa.com/t/preloader-problem/24277/1 "2003-06-28T04:58:00Z")

</div>

this is the code I am using, but after the preloader runs and loads the movie to 10% of its size, it does not move on the the scene “player”

onClipEvent(enterFrame){  
loaded = \_root.getBytesLoaded();  
total = \_root.getBytesTotal();  
framesLoaded = Math.ceil((loaded/total)\*100);  
gotoAndStop(framesLoaded);  
if(framesLoaded \>= 10){  
\_root.gotoAndStop(“player”, 1);  
}  
}

---

<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:** [June 28, 2003, 3:18pm UTC](https://forum.kirupa.com/t/preloader-problem/24277/2 "2003-06-28T15:18:55Z")

</div>

try adding the code in the frame actions of frame 1 and adding a gotoAndPlay(1) action in a keyframe at frame 2

---

<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:** [June 28, 2003, 3:24pm UTC](https://forum.kirupa.com/t/preloader-problem/24277/3 "2003-06-28T15:24:32Z")

</div>

so keep things the way they are but just take the gotoAndPlay action and put it on frame 2 like this:

frame one:

onClipEvent(enterFrame){  
loaded = \_root.getBytesLoaded();  
total = \_root.getBytesTotal();  
framesLoaded = Math.ceil((loaded/total)\*100);  
gotoAndStop(framesLoaded);  
if(framesLoaded \>= 10){  
play();  
}  
}

frame two:

gotoAndPlay(“player”, 1);

---

<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:** [June 28, 2003, 3:31pm UTC](https://forum.kirupa.com/t/preloader-problem/24277/4 "2003-06-28T15:31:02Z")

</div>

no no. just put this code in frame 1-  
ifFrameLoaded(“player”,1){gotoAndPlay(“Player”,1)  
loaded =getBytesLoaded  
and so on.

in second frame just add-  
gotoAndPlay(1)

that is ALL. No onCLipEvent handlers for frame actions

---

<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:** [June 28, 2003, 3:35pm UTC](https://forum.kirupa.com/t/preloader-problem/24277/5 "2003-06-28T15:35:53Z")

</div>

the problem with that is I don’t want to load the whole movie nefore it will play it has embedded mp3s in it the have graphics that are synced, so I only want to load 10% of the movie then play so the inerface will be visable aswell as the first mp3.

so that is why I was using the math function to calculate 10%
