# How to load your swf properly?

**URL:** https://forum.kirupa.com/t/how-to-load-your-swf-properly/267086
**Category:** flash
**Created:** [July 28, 2008, 4:10pm UTC](https://forum.kirupa.com/t/how-to-load-your-swf-properly/267086 "2008-07-28T16:10:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![REEF](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@REEF](https://forum.kirupa.com/u/REEF)
#### Post date: [July 28, 2008, 4:10pm UTC](https://forum.kirupa.com/t/how-to-load-your-swf-properly/267086/1 "2008-07-28T16:10:24Z")

</div>

Since I’ll probably have less than 5 frames in my entire SWF - now that I’m using OOP and tween classes to get all my animations done - how would I make sure all classes and exported assets that load in before the first frame shows won’t load in until I want it to? Generally, I’m trying to avoid the SWF from looking empty while it loads in other stuff before my preloader even shows.

I’m also trying to build a good preloader class, where I can just say stuff like:

```auto

var preload1:Preloader = new Preloader(); 
 // loads main movie
preload1.preload(this, root, {y: 100, x:100, type:"horizontal", onComplete:trace("done")});

var preload2:Preloader = new Preloader();
preload2.preload("image.jpg", container2, {y: 100, x:100, type:"circular"}); // loads an image

```

Any good classes for preloading that anyone might have or know about? Or tips on making my own?
