# Replace swf?

**URL:** <https://forum.kirupa.com/t/replace-swf/187627>\
**Category:** Uncategorized\
**Created:** [May 1, 2006, 3:19am UTC](https://forum.kirupa.com/t/replace-swf/187627 "2006-05-01T03:19:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wheatleyweb](https://avatars.discourse-cdn.com/v4/letter/w/53a042/32.png) [@wheatleyweb](https://forum.kirupa.com/u/wheatleyweb)\
**Post date:** [May 1, 2006, 3:19am UTC](https://forum.kirupa.com/t/replace-swf/187627/1 "2006-05-01T03:19:50Z")

</div>

I’ve am currently working on my new design for my site. Now all of the new “hot” sites have a bit of animation before the main preloader starts. I want to do the same thing. Have a few elements animate in, and then the main preloader begins…

The preloader script I’m using is very simple:

```php

LOADED = Math.round(getBytesLoaded());
TOTAL = Math.round(getBytesTotal());
PERCENT = LOADED/TOTAL;
bar._width = PERCENT*100;
if (LOADED == TOTAL) {
gotoAndPlay(3);
}

```

Because it doesn’t lie on the first frame… the preloader doesnt work… The only way I could fathom a way to make this work is to have a swf with the initial animations, and then at the end of the animation… replace that swf with another that begins the preload… I don’t know how to do this, and I really don’t think this is the way things are done.

Questions:

Is is possible to have a main swf replaced by another?

-if not-

Can anyone lead me into a direction where I might find some instruction on preloading in the middle of the main timeline???

PS Im using mx2004

Thanks guys.

wheatleyweb
