# Preloader help?

**URL:** <https://forum.kirupa.com/t/preloader-help/10544>\
**Category:** Uncategorized\
**Created:** [January 3, 2003, 1:55am UTC](https://forum.kirupa.com/t/preloader-help/10544 "2003-01-03T01:55:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eggplant\_wizard](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@eggplant\_wizard](https://forum.kirupa.com/u/eggplant_wizard)\
**Post date:** [January 3, 2003, 1:55am UTC](https://forum.kirupa.com/t/preloader-help/10544/1 "2003-01-03T01:55:07Z")

</div>

ok i have a navigation menu that loads external swf files into a blank movie, but i want a small preloader to lplay before loading the files. how would use ifFrameLoaded and gotoAndPlay to play my preloader in this blank frame while the swf loads?

---

<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:** [January 3, 2003, 2:30am UTC](https://forum.kirupa.com/t/preloader-help/10544/2 "2003-01-03T02:30:31Z")

</div>

ok, have two frames at the beginning of your external swf.

On the first frame put this ::

ifFrameLoaded (400) {  
gotoAndPlay(10);  
}

On the second frame put this ::

gotoAndPlay(1);

First line of code “400” that is the number of frames flash checks that has been loaded so if you only have 300 frames , just put 300, then it tell it to go and play frame “10” which is where the beginning of your animation is.

Second line just teling it to repeat!!

Now for an animation, create a simple animation in a moviclip.  
Drag it onto the main timeline, enter a keyframe above the first frame of the preloader, and place your animtion there, create another keyframe right after it (above the the second line of code) so you have your movieclip over two frames!!

Let me know how u go!!

=)

---

<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:** [January 3, 2003, 3:47am UTC](https://forum.kirupa.com/t/preloader-help/10544/3 "2003-01-03T03:47:59Z")

</div>

ifFramesLoaded is a bit outdated. I believe that is a Flash 4 (possibly also Flash 5) thing.

There are many preloader tutorials on [kirupa.com](http://kirupa.com) that teach the better more accurate method of preloading.

---

<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:** [January 3, 2003, 4:41am UTC](https://forum.kirupa.com/t/preloader-help/10544/4 "2003-01-03T04:41:57Z")

</div>

which method is the best for preloading as far a speed and quality??

---

<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:** [January 3, 2003, 4:59am UTC](https://forum.kirupa.com/t/preloader-help/10544/5 "2003-01-03T04:59:12Z")

</div>

Well, technically both methods work, but I think ifFramesLoaded will probably (if not already) be deprecated (fazed out).

Anywho, the getBytesLoaded and getBytesTotal methods are the new improved way. It actually gets the file size of your file, and waits until the entire movie size is loaded before it plays, and not just waiting until a certain frame is loaded up to. IMO this is more accurate, but I never really compared the two.

Here are so preloader tutorials on this site you can follow.

Basic Preloader -  
[http://www.kirupa.com/developer/actionscript/preloader.asp](http://www.kirupa.com/developer/actionscript/preloader.asp)

Preloader Component (touch this and die…well it is an opinion, but I highly dislike this method, and we get a lot of questions on the forum about it not working) -  
[http://www.kirupa.com/developer/mx/percentage\_loader.asp](http://www.kirupa.com/developer/mx/percentage_loader.asp)

Percentage Preloader -  
[http://www.kirupa.com/developer/mx/preloader.asp](http://www.kirupa.com/developer/mx/preloader.asp)

Percentage Preloader with Loading Bar -  
[http://www.kirupa.com/developer/mx/percentagepreloader.asp](http://www.kirupa.com/developer/mx/percentagepreloader.asp)
