# Problem Loading external swf in a scrollpan

**URL:** <https://forum.kirupa.com/t/problem-loading-external-swf-in-a-scrollpan/258805>\
**Category:** flash\
**Created:** [April 28, 2008, 2:38pm UTC](https://forum.kirupa.com/t/problem-loading-external-swf-in-a-scrollpan/258805 "2008-04-28T14:38:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alvin009](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@alvin009](https://forum.kirupa.com/u/alvin009)\
**Post date:** [April 28, 2008, 2:38pm UTC](https://forum.kirupa.com/t/problem-loading-external-swf-in-a-scrollpan/258805/1 "2008-04-28T14:38:48Z")

</div>

Hello everyone.

I have an issue that I am hoping someone can help me with.

I am displaying an external diagram picture (swf) in a main scroll pan using AS2.0. I want to load some external objects (swf) on top of the diagram from another object scroll pan.

My problem is when I am drag & drop the object from object scroll pan to main scroll pan the diagram picture get disappears. Please check following code.

When I am loading the external swf object then the scroll pan is just loading 1 object at a time and not allowing to move the object.

The external objects are not working so I have also tried with internal library, So when I am loading the objects from internal library then also it is removing the diagram.

**On Button click load the diagram image**  
main\_scrollPane.contentPath = “clips.swf”; // (code is working)  
// main\_scrollPane.contentPath = SwfDiagramPath;

**To load the internal object from library**

var mcMain:MovieClip;  
main\_scrollPane.contentPath = “Container”;  
mcMain = main\_scrollPane.content;

var Controls:MovieClip = mcMain.attachMovie(“mc\_Label”,“Lbl”+lbl\_count, mcMain.getNextHighestDepth(),position)

**To load the external movie object I have used following code**  
var moviefile:Array = new Array;  
moviefile [‘name’] = “floor”;  
moviefile [‘path’] = “floors/First.swf”;

//. . . . some code

moviename = moviefile [‘name’];  
objectDepth = objectDepth+1;

var clip:MovieClip = main\_scrollPane.content.pane\_mc.createEmptyMovieClip(moviename objectDepth);  
// // pane\_mc is the name of the name of the movie clip which is in the “clips.swf”  
clip.loadMovie(moviefile[‘path’]);  
clip.\_x = 50;  
clip.\_y = 50;

I appreciate any help.

Thanks!  
Alvin
