# New site up--needs ext swf preloader

**URL:** <https://forum.kirupa.com/t/new-site-up-needs-ext-swf-preloader/42284>\
**Category:** Uncategorized\
**Created:** [February 7, 2004, 7:59am UTC](https://forum.kirupa.com/t/new-site-up-needs-ext-swf-preloader/42284 "2004-02-07T07:59:29Z")\
**Posts on this page:** 7\
**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/42284/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

---

<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 8, 2004, 12:58am UTC](https://forum.kirupa.com/t/new-site-up-needs-ext-swf-preloader/42284/2 "2004-02-08T00:58:52Z")

</div>

“AT Slopes, Urban Media Solutioooooooooonnnnnnnnnnnnnnssssssssssssssss” 😉 =)

Your site looks nice, but I can’t really help you on the preloader question… But I’m sure someone will very soon.

Good job 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 8, 2004, 3:33am UTC](https://forum.kirupa.com/t/new-site-up-needs-ext-swf-preloader/42284/3 "2004-02-08T03:33:18Z")

</div>

thanks man for the comments i really want to improve on the site starting with the preloader so if anyone has any suggestions i would be grateful

---

<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 8, 2004, 5:29am UTC](https://forum.kirupa.com/t/new-site-up-needs-ext-swf-preloader/42284/4 "2004-02-08T05:29:38Z")

</div>

Here is a code that I use… it has always worked.

1st, label your 1st key frame StartFrame .

2nd, label your second key frame IfEndFrameLoaded with the following action scripts (make sure the frame type is listed as frame label):

1. ifFrameLoaded (“page 1”, “EndFrame”)
2. gotoAndStop(“StartMovie”)

3rd, label 3rd key frame GoToStartFrame with the following action scripts (make sure the frame type is listed as frame label):  
gotoAndPlay(“StartFrame”, “1”);

4th, for your blank key frame label it StartMovie with the following script (make sure the frame type is listed as frame number):  
gotoAndPlay(“page 1”, 1)

That should work… if you ever get stuck, there are plenty of good script sites on the web, one of them being macromedia. You can put your preloader anywhere between the 1st and 2nd frame… I would not use multiple layers… if you do, turn your preloader into a movie clip and add layers within that.

Hope this helps… by the way, your site is nice!

Amy  
[http://www.vizualstorm.com](http://www.vizualstorm.com)

---

<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 8, 2004, 12:04pm UTC](https://forum.kirupa.com/t/new-site-up-needs-ext-swf-preloader/42284/5 "2004-02-08T12:04:12Z")

</div>

Your site is good some pixel fonts were slightly blurred 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 9, 2004, 5:01am UTC](https://forum.kirupa.com/t/new-site-up-needs-ext-swf-preloader/42284/6 "2004-02-09T05:01:03Z")

</div>

–yeah thanks vstorm for the reply

i was looking for somethings along the line of a loadbar – for the external swf that gets called and then fades out once the swf is loaded

---

<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 10, 2004, 6:14am UTC](https://forum.kirupa.com/t/new-site-up-needs-ext-swf-preloader/42284/7 "2004-02-10T06:14:35Z")

</div>

Look it up on Macromedia… I am sure it’s there…
