# Communicating with a loaded SWF

**URL:** https://forum.kirupa.com/t/communicating-with-a-loaded-swf/233984
**Category:** flash
**Created:** [July 29, 2007, 3:07am UTC](https://forum.kirupa.com/t/communicating-with-a-loaded-swf/233984 "2007-07-29T03:07:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nemoBejingler](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@nemoBejingler](https://forum.kirupa.com/u/nemoBejingler)
#### Post date: [July 29, 2007, 3:07am UTC](https://forum.kirupa.com/t/communicating-with-a-loaded-swf/233984/1 "2007-07-29T03:07:42Z")

</div>

I’m trying to load a SWF and then tell it to play. I can’t seem to communicate with the loaded SWF to tell it to play. I’m probably not referencing it correctly. Any help is appreciated. Thx

```auto
import flash.display.*;
import flash.net.*;
import flash.events.*;

var myLoader:Loader = new Loader();
var myRequest:URLRequest = new URLRequest("home.swf");

myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);

function loadComplete(event:Event):void {
	addChild(myLoader);
	[COLOR="Red"]myLoader.content.gotoAndPlay(2);[/COLOR] 
}

myLoader.load(myRequest);

```
