# \[F5\] Preloader won't work!

**URL:** <https://forum.kirupa.com/t/f5-preloader-wont-work/14062>\
**Category:** flash\
**Created:** [February 21, 2003, 3:23pm UTC](https://forum.kirupa.com/t/f5-preloader-wont-work/14062 "2003-02-21T15:23:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rainbowpants](https://avatars.discourse-cdn.com/v4/letter/r/a88e4f/32.png) [@rainbowpants](https://forum.kirupa.com/u/rainbowpants)\
**Post date:** [February 21, 2003, 3:23pm UTC](https://forum.kirupa.com/t/f5-preloader-wont-work/14062/1 "2003-02-21T15:23:06Z")

</div>

Hi, i am trying to write a preloader for my flash webpage, using the tutorial given here. I have a single instance of a movie in my root timeline that I want the flash file to play after it has loaded. I currently have two layers in my root, one that has the movie i want to play in it in frame 2 (wiht nothing in frame 1), and another that has only a preloader animation in frame 1. The code i ahve associated with frame 1 (in the preloader animation layer) is:

if (\_root.page1.\_framesloaded\>=\_root.page1.\_totalframes) {  
gotoAndPlay (2);  
} else {  
gotoAndPlay (1);  
}

(page1 is the instance that i want to play after it has fully loaded)

and the code that i have in the second frame of the layer containing the instance page1 is:

stop();

Whenever I try and export the movie and run it, i just get a blank screen. Im probably doing something stoopid, but i cant figure it out, and i have to hand it in in a few hours ☹ Thanks for any help anyone can offer.

nic.

---

<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:** [February 21, 2003, 5:58pm UTC](https://forum.kirupa.com/t/f5-preloader-wont-work/14062/2 "2003-02-21T17:58:51Z")

</div>

change the code to this:

```auto

if (framesloaded>=totalframes) {
gotoAndPlay (2);
} else {
gotoAndPlay (1);
}

```

and if you don´t see the preloader, it is coz it is not preloading…the swf is in your machine! 😉

to emulate a preloader, hit ctrl+enter (to test the movie), and when testing hit ctrl+enter again (to test the movie in emulated real time download). you may want to hit ctrl+b to see the bandwidth profile, and mess up with the debug menu for different speed conections.

Cheers :flower:

---

<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:** [February 21, 2003, 7:00pm UTC](https://forum.kirupa.com/t/f5-preloader-wont-work/14062/3 "2003-02-21T19:00:28Z")

</div>

Thanksq, but I tried that originally, although i used underscores before the total and number of frames properties. This does make the preloader appear for a short time, but i think that its only loading some of the movie, because when it dissapears and the movie plays, it still plays slowly for a while, and continues to load. I though that by putting my whole file into another movie clip instance, and then checking \_root.movieclipname.framesloaded\>=\_root.movieclipnametotalframes it would force flash to check the size of the whole movie. :q: thanks for the help though.

---

<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:** [February 21, 2003, 7:21pm UTC](https://forum.kirupa.com/t/f5-preloader-wont-work/14062/4 "2003-02-21T19:21:57Z")

</div>

…is not because it is still loading…it is because it is cpu intensive.

🙂

---

<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:** [February 22, 2003, 10:15am UTC](https://forum.kirupa.com/t/f5-preloader-wont-work/14062/5 "2003-02-22T10:15:14Z")

</div>

ohk! thanks. Its nice to know that im making my pc think other than by playing games 😉
