# Loading External SWF's/URL Requests

**URL:** <https://forum.kirupa.com/t/loading-external-swfs-url-requests/288251>\
**Category:** flash\
**Created:** [May 13, 2009, 1:01pm UTC](https://forum.kirupa.com/t/loading-external-swfs-url-requests/288251 "2009-05-13T13:01:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhauser](https://avatars.discourse-cdn.com/v4/letter/b/a9a28c/32.png) [@bhauser](https://forum.kirupa.com/u/bhauser)\
**Post date:** [May 13, 2009, 1:01pm UTC](https://forum.kirupa.com/t/loading-external-swfs-url-requests/288251/1 "2009-05-13T13:01:46Z")

</div>

Hi, I am trying to load in an External SWF inside my Flash file and have only been able to load one successfully. I am loading the one successfully through doing…

* * *

var request:URLRequest = new URLRequest(“[http://www.brianhauser.com/550/mouse\_draw.swf](http://www.brianhauser.com/550/mouse_draw.swf)”);

public function NewPortfolio():void{

## loader.load(request); bkground.addChild(container6); container6.addChild(loader); container6.x= 100; container6.y= 200;

… so my issue is I can’t add more than 1 external SWF to my MovieClip and then I have to position it so its x=100, y=-2160 on my bkground movie clip because my background movie clip is larger than my stage(viewable area) in flash because I am using an external tween class through Caurina.

**URL Requests**

So I tried an alternate method of getting URL’s on the click of a movie clip and it didn’t work. Below is the code I used. I know the links aren’t working yet because I don’t have those SWF’s uploaded as of yet. If you know of any better ways to do this please let me know…

* * *

public function NewPortfolio():void{

```
		one.addEventListener(MouseEvent.CLICK, onMouseClickOne);
		two.addEventListener(MouseEvent.CLICK, onMouseClickTwo);
		three.addEventListener(MouseEvent.CLICK, onMouseClickThree);
		play_sensor.addEventListener(MouseEvent.CLICK, onMouseClickPlay);

```

public function onMouseClickOne(e:MouseEvent):void{  
var request:URLRequest = new URLRequest(“[http://www.brianhauser.com/550/web/one.swf](http://www.brianhauser.com/550/web/one.swf)”);  
navigateToURL(request, “\_blank”);  
}

```
	public function onMouseClickTwo(e:MouseEvent):void{
			var request:URLRequest = new URLRequest("http://www.brianhauser.com/550/web/two.swf");
			navigateToURL(request, "_blank");
		}
		
	
	
	
	public function onMouseClickThree(e:MouseEvent):void{
			var request:URLRequest = new URLRequest("http://www.brianhauser.com/550/web/three.swf");
			navigateToURL(request, "_blank");
		}
		

	
	function onMouseClickPlay(e:MouseEvent):void{
			var request:URLRequest = new URLRequest("http://www.brianhauser.com/550/fish.swf");
			navigateToURL(request, "_blank");
		}

```

* * *

Thanks for your help is you have any questions please email me at [brian.hauser@gmail.com](mailto:brian.hauser@gmail.com)
