# New site up--needs ext swf preloader

**URL:** https://forum.kirupa.com/t/new-site-up-needs-ext-swf-preloader/101218
**Category:** Uncategorized
**Created:** [February 7, 2004, 7:59am UTC](https://forum.kirupa.com/t/new-site-up-needs-ext-swf-preloader/101218 "2004-02-07T07:59:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bugjuice](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bugjuice](https://forum.kirupa.com/u/bugjuice)
#### Post date: [February 7, 2004, 7:59am UTC](https://forum.kirupa.com/t/new-site-up-needs-ext-swf-preloader/101218/1 "2004-02-07T07:59:29Z")

</div>

hey guys check out my portolio site at

[http://www.rit.edu/~ast7707/portfolio.html](http://www.rit.edu/~ast7707/portfolio.html)

also by the way can some buddy please help me out on the the main preloader code --ive been trying to figure this out for about a month or so

this is what i have to load the external swfs on the first blank frame of the movie i have –

// set up variables for movie start  
\_root.swfAlert = “fadeout”;  
\_root.swfNum = 1;  
\_root.containerPositionX = 162;  
\_root.containerPositionY = 79;  
\_root.fadeSpeed =18;  
// here is the function that loads the movie

function loadSwf() {

```
// sets the current movie name to load
_root.activeSwf = "swf"+_root.swfNum+".swf";
// load the swf
loadMovie(_root.activeSwf, _root.container);
// set the x, y position
_root.container._x = _root.containerPositionX;
_root.container._y = _root.containerPositionY;

```

}  
// load the first swf when the movie starts  
loadSwf();

then on the container clip i have this code–

//this enterframe script checks the value of “swfAlert” and does something depending on the returned result

onClipEvent (enterFrame) {  
if (\_root.swfAlert == “fadeOut”) {  
\_root.container.\_alpha -= \_root.fadeSpeed;  
if (\_root.container.\_alpha\<=0) {  
unloadMovie(\_root.container);

```
		_root.swfAlert = "load";
	}
}
if (_root.swfAlert == "load") {
	_root.loadSwf();
	_root.swfAlert = "fadeIn";
}
if (_root.swfAlert == "fadeIn") {
	_root.container._alpha += _root.fadeSpeed;
	if (_root.container._alpha&gt;=100) {
		_root.swfAlert = "static";
	}
}

```

}

–this works fine  
–what i want is to add is a simple preloader  
all i want to have is a preloader checking if the external swfs are loaded and if they are i want the preloader to fade out

can somebody please help or guide me in the right direction
