# Loading external swf

**URL:** <https://forum.kirupa.com/t/loading-external-swf/214454>\
**Category:** Uncategorized\
**Created:** [January 29, 2007, 6:13am UTC](https://forum.kirupa.com/t/loading-external-swf/214454 "2007-01-29T06:13:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ipuff](https://avatars.discourse-cdn.com/v4/letter/i/4af34b/32.png) [@ipuff](https://forum.kirupa.com/u/ipuff)\
**Post date:** [January 29, 2007, 6:13am UTC](https://forum.kirupa.com/t/loading-external-swf/214454/1 "2007-01-29T06:13:09Z")

</div>

hello,  
i am loading an external .swf file in container. Each button opens a separate page. the problem is that the site becomes really really slow after the external swf opens or while it opens. Here is the code.

\_root.background\_mc.page.menu.b1.onRelease = function() {

```
if (_root.section != "home.swf") {
	_root.section = "home.swf";
	_root.background_mc.page.transition.gotoAndPlay("closing");
}

```

};  
\_root.background\_mc.page.menu.b2.onRelease = function() {  
if (\_root.section != “services.swf”) {

```
	_root.section = "services.swf";
	_root.background_mc.page.transition.gotoAndPlay("closing");
}

```

};  
\_root.background\_mc.page.menu.b3.onRelease = function() {  
if (\_root.section != “about\_us.swf”) {

```
	_root.section = "about_us.swf";
	_root.background_mc.page.transition.gotoAndPlay("closing");
}

```

};  
\_root.background\_mc.page.menu.b4.onRelease = function() {  
if (\_root.section != “projects.swf”) {

```
	_root.section = "projects.swf";
	_root.background_mc.page.transition.gotoAndPlay("closing");
}

```

};  
\_root.background\_mc.page.menu.b5.onRelease = function() {  
if (\_root.section != “contact\_us.swf”) {

```
	_root.section = "contact_us.swf";
	_root.background_mc.page.transition.gotoAndPlay("closing");
}

```

};

im not sure why is that happening. I dont mind importing the swf’s into the library and opening it from there. But i dont know how to do that. Can anyone please give me a solution for this. either locally or external.

cheers
