# Loading swf into dynamic movieclip

**URL:** <https://forum.kirupa.com/t/loading-swf-into-dynamic-movieclip/284422>\
**Category:** Uncategorized\
**Created:** [March 19, 2009, 3:02am UTC](https://forum.kirupa.com/t/loading-swf-into-dynamic-movieclip/284422 "2009-03-19T03:02:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adlib33](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@adlib33](https://forum.kirupa.com/u/adlib33)\
**Post date:** [March 19, 2009, 3:02am UTC](https://forum.kirupa.com/t/loading-swf-into-dynamic-movieclip/284422/1 "2009-03-19T03:02:24Z")

</div>

OK, noobie tried and tried.

What I want to do is load a swf(mp3 player) into another dynamic movieclip that has been added and tweened onto the stage. Ideally, on a button press, the swf loads into the dynamic clip first and on completion they both tween/fade onto the stage. I’ve got my fingers crossed that this is just a simple syntax/scoping problem but in every combination I tried I got errors galore.

```auto
import flash.display.*;//
var mp3playerMC:Mp3playerMC = new Mp3playerMC();//movieclip class

function buttonPress(e:MouseEvent):void
	{
	var req:URLRequest = new URLRequest("mp3.swf");
	var mp3Load:URLLoader = new URLLoader();
	
	function mp3Loaded(event:Event):void 
		{
   			//What code to add the mp3.swf to mp3playerMC?;
		}
	mp3Load.addEventListener(Event.COMPLETE, mp3Loaded);
	mp3Load.load(req);
	
	//without trying to load mp3.swf, this code works for simply                      
        //calling up and loading the dynamic movieclip-mp3playerMC sans the mp3.swf

        addChild(mp3playerMC);
	mp3playerMC.x = 320;
	mp3playerMC.y = 190;

	fadeInTween = new Tween(mp3playerMC, "alpha", None.easeNone, 0, 1, 2, true);

	}  

```

Thank you in advance to anyone willing to set a rookie strait…
