# Difficulty loading external SWF

**URL:** <https://forum.kirupa.com/t/difficulty-loading-external-swf/156210>\
**Category:** flash\
**Created:** [July 23, 2005, 9:07pm UTC](https://forum.kirupa.com/t/difficulty-loading-external-swf/156210 "2005-07-23T21:07:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan57355](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@dan57355](https://forum.kirupa.com/u/dan57355)\
**Post date:** [July 23, 2005, 9:07pm UTC](https://forum.kirupa.com/t/difficulty-loading-external-swf/156210/1 "2005-07-23T21:07:30Z")

</div>

![](http://flashmx2004.com/forums/style_images/1/spacer.gif)  
I’ve been having difficulty getting an external SWF to load into a movieclip on my stage. The teal box is a movieclip with this particular instance named mcStage1. I put an identical teal box directly behind it on a lower layer for purposes of illustration that will become clear shortly. The small dark blue rectangle is a button that is supposed to cause an external swf, in this case “tester2.swf” to load into the space currently occupied by mcStage1.

![](http://img328.imageshack.us/img328/1238/flash017dl.jpg)

I am trying to make a click on the dark blue button load an external SWF file into mcStage1. I have tried the following three methods:

_ **Generated by Flash Behaviors** _

on (release) {

```
//load Movie Behavior
if(this.mcStage1 == Number(this.mcStage1)){

```

loadMovieNum(“tester2.swf”,this.mcStage1);  
} else {  
this.mcStage1.loadMovie(“tester2.swf”);  
}  
//End Behavior

}

\*\*\*Written by me

\*\*\*on (release) {

```
loadMovie("tester2.swf",_root.mcStage1);

```

}

\*\*\*Also written by me

\*\*\*on (release){  
\_root.mcStage1.loadMovie(“tester2.swf”);  
}

* * *

In all three cases, the external SWF loads with its center at exactly the lower right corner of the target movieclip mcStage1. I created an identical square behind mcStage1 for illustrative purposes, as seen in the image below. It doesn’t matter where I move mcStage1 on the stage, it always loads in the same relative position. (note the red square in this case is my external swf, called “tester2.swf”)

![](http://img345.imageshack.us/img345/7035/flashresult1mp.jpg)

Any help resolving this issue would be greatly appreciated!
