# External movie preloaders

**URL:** https://forum.kirupa.com/t/external-movie-preloaders/65039
**Category:** Uncategorized
**Created:** [September 22, 2004, 1:53pm UTC](https://forum.kirupa.com/t/external-movie-preloaders/65039 "2004-09-22T13:53:05Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![theHollow](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/thehollow/32/106_2.png) [@theHollow](https://forum.kirupa.com/u/theHollow)
#### Post date: [September 22, 2004, 1:53pm UTC](https://forum.kirupa.com/t/external-movie-preloaders/65039/1 "2004-09-22T13:53:05Z")

</div>

i need help making just a simple preloader for an external movie. all it needs to do is load the movie, nothing special. ive looked on this forum but none of the stuff works. does anyone know how?

Thnx,  
Brendan Smith

---

<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: [September 22, 2004, 2:13pm UTC](https://forum.kirupa.com/t/external-movie-preloaders/65039/2 "2004-09-22T14:13:17Z")

</div>

something like this should work.

```auto

this.onEnterFrame = function() { 
     filesize = contentMC.getBytesTotal(); 
     loaded = contentMC.getBytesLoaded(); 
     preloaderMC._visible = true; 
     if (loaded != filesize) { 
          preloaderMC.loadBar._xscale = 100*loaded/filesize; 
     } else { 
     preloaderMC._visible = false; 
     contentMC._visible = true;
} 
} 
}; 

```

contentMC is the empty MC to load external SWFs into.  
preloaderMC is a MC with a loadbar MC within…

---

<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: [September 22, 2004, 3:45pm UTC](https://forum.kirupa.com/t/external-movie-preloaders/65039/3 "2004-09-22T15:45:33Z")

</div>

I’m looking for a preloader for external swf’s that load into an empty container clip that is within a movie clip which is on the main timeline. I’ve gone through the tutorial here-‘preloader and transition for dynamic files’. I’m not sure how to do the pathing as I’m another timeline up.  
you can see what I’m trying to do here  
[http://www.glowdesignhouse.com](http://www.glowdesignhouse.com)  
go to portfolio then nissan then buttons 2,3 and 4. here they are attached but it’s too big and I want it to load.  
any suggestions?

---

<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: [September 22, 2004, 4:10pm UTC](https://forum.kirupa.com/t/external-movie-preloaders/65039/4 "2004-09-22T16:10:46Z")

</div>

just add the preloader into the .swf itself.

---

<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: [September 22, 2004, 5:11pm UTC](https://forum.kirupa.com/t/external-movie-preloaders/65039/5 "2004-09-22T17:11:23Z")

</div>

Is ‘this’ written on the main timeline of the Flash movie, or is it written on or inside a movieclip?

this.onEnterFrame = function() {  
// code  
};

Thanks.

---

<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: [September 22, 2004, 5:22pm UTC](https://forum.kirupa.com/t/external-movie-preloaders/65039/6 "2004-09-22T17:22:39Z")

</div>

Go with maximum\_flash’s suggestion. Follow any of the preloader tutorials on [kirupa.com](http://kirupa.com) and put the preloader on your external swf. That way when you load it into your main movie using loadMovie the preloader is the first thing to be seen. Just be careful of using \_root in your preloader code on the external swf.

:hr:

---

<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: [September 22, 2004, 5:56pm UTC](https://forum.kirupa.com/t/external-movie-preloaders/65039/7 "2004-09-22T17:56:44Z")

</div>

\<-- sammy

🍺

---

<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: [September 22, 2004, 8:45pm UTC](https://forum.kirupa.com/t/external-movie-preloaders/65039/8 "2004-09-22T20:45:03Z")

</div>

> [@lunatic](#):
>
> Go with maximum\_flash’s suggestion. Follow any of the preloader tutorials on [kirupa.com](http://kirupa.com) and put the preloader on your external swf. That way when you load it into your main movie using loadMovie the preloader is the first thing to be seen. Just be careful of using \_root in your preloader code on the external swf.
> 
> :hr:

I’m trying to put a preloader in the external swf but it never works even when I test it on its own-I think because in the streaming profile everything is in the first frame. It’s just video with a component control bar.  
also,should I use \_root or \_parent or just the full path of the clip i.e.(nissan.containerone.loadmovie.“movieclip1”)?

---

<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: [September 22, 2004, 9:18pm UTC](https://forum.kirupa.com/t/external-movie-preloaders/65039/9 "2004-09-22T21:18:23Z")

</div>

The easiest thing is to use the full path to the clip. Sometimes this makes it long but you can always set the path to a variable if it gets to be a pain. Others will tell you to use a bunch of \_parent’s (e.g. \_parent.\_parent.\_parent.mymovieclip) but this has never worked well for me.

But yeah, if you are going to stick a preloader in there you’ll probably have to move the other stuff off the first frame.

:hr:

---

<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: [September 24, 2004, 3:10am UTC](https://forum.kirupa.com/t/external-movie-preloaders/65039/10 "2004-09-24T03:10:24Z")

</div>

yeah, \_parent is a pain.

---

<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: [September 24, 2004, 4:21am UTC](https://forum.kirupa.com/t/external-movie-preloaders/65039/11 "2004-09-24T04:21:59Z")

</div>

In my opinion, using preloaders on external swf’s is a pain, if your loading in more than one swf on the same level, you might as well use the same preloader over and over in the swf which the others are loading into.The coding is just as easy, and you don’t have to script the same thing over and over. For this method, instead of using \_root to access the main timeline, you just use \_level. Simple and effective.

```auto
onClipEvent(enterFrame) {
	loaded = Math.round(_level2.getBytesLoaded()/1024);
	total = Math.round(_level2.getBytesTotal()/1024);
	percent = Math.round((loaded/total)*100);
      if (percent == 100) {
         _level2.gotoAndPlay("start");
      }
}

```

this type of loader can be used over and over to load things into level 2.

---

<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: [September 24, 2004, 4:37am UTC](https://forum.kirupa.com/t/external-movie-preloaders/65039/12 "2004-09-24T04:37:42Z")

</div>

> [@monkeyfresh](#):
>
> In my opinion, using preloaders on external swf’s is a pain, if your loading in more than one swf on the same level, you might as well use the same preloader over and over in the swf which the others are loading into.The coding is just as easy, and you don’t have to script the same thing over and over. For this method, instead of using \_root to access the main timeline, you just use \_level. Simple and effective.
> 
> ```auto
> onClipEvent(enterFrame) {
> loaded = Math.round(_level2.getBytesLoaded()/1024);
> total = Math.round(_level2.getBytesTotal()/1024);
> percent = Math.round((loaded/total)*100);
> if (percent == 100) {
> _level2.gotoAndPlay("start");
> }
> }
> 
> ```
> 
> this type of loader can be used over and over to load things into level 2.

I agree with Monkeyfresh.  
I use a different way with setInterval but it works the same.You can download a working version with transition thing here  
[http://www.kirupaforum.com/forums/showthread.php?t=69268&page=2&pp=15](http://www.kirupaforum.com/forums/showthread.php?t=69268&page=2&pp=15)  
(gridbuttons2.fla )
