# \[FMX\] Preloader needed for external swf's

**URL:** https://forum.kirupa.com/t/fmx-preloader-needed-for-external-swfs/51253
**Category:** flash
**Created:** [May 11, 2004, 9:49am UTC](https://forum.kirupa.com/t/fmx-preloader-needed-for-external-swfs/51253 "2004-05-11T09:49:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dboers](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@dboers](https://forum.kirupa.com/u/dboers)
#### Post date: [May 11, 2004, 9:49am UTC](https://forum.kirupa.com/t/fmx-preloader-needed-for-external-swfs/51253/1 "2004-05-11T09:49:52Z")

</div>

Hi,

I have a main movie in wich i load external swf’s. I would like to integrate a preloader in the main swf. I tried it with preloaders in the external swf’s but that is only the first time functional.

This is the code I have in the main movie:

```auto
function pagina(page) {
 showContent(page);
 }
 
function showContent(page){
 var c = this["content_"+page];
  for (var i in this) {
  if (this*._name.substr(0, 8) == "content_") {
   this*._visible = (this*._name.substr(8) == page);
   c.loadMovie(page+".swf");
   loadingPage = page;
   
  }
 }
}
showContent("company");
for (var i in this) {
 if (this*._name.substr(0, 4) == "btn_") {
  setKnop(this*._name);
 }
}
function setKnop(clip) {
 var clip = eval(clip);
 clip.onRollOver = function() {
  new Color(this).setRGB(0xA10000);
 };
 
 clip.onRollOut = function() {
  if (!this.pushed) {
   new Color(this).setRGB(0xFFFFFF);
  } else {
   new Color(this).setRGB(0xA10000);
  }
 };
 
 clip.onRelease = function() {
  _root.resetKnop();
  this.pushed = true;
  this.useHandCursor = false;  
  new Color(this).setRGB(0xA10000);
  pagina(this._name.substr(4));
 
  };
}

```

Is there please somebody who can help me?

Thanks in advance 🙂
