# Communications with external swf

**URL:** <https://forum.kirupa.com/t/communications-with-external-swf/324675>\
**Category:** Uncategorized\
**Created:** [September 2, 2011, 3:12pm UTC](https://forum.kirupa.com/t/communications-with-external-swf/324675 "2011-09-02T15:12:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![somdow](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@somdow](https://forum.kirupa.com/u/somdow)\
**Post date:** [September 2, 2011, 3:12pm UTC](https://forum.kirupa.com/t/communications-with-external-swf/324675/1 "2011-09-02T15:12:23Z")

</div>

hello everyone.

new problem today.

ok so im bringing in a test external swf like so:

```auto
var loader:Loader = new Loader();                     
var url:URLRequest = new URLRequest("load2.swf"); 
loader.load(url);                                    
addChild(loader);

```

Now im trying to envoke a goto and play like so:

```auto
var loaded:Object;

loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleLoaded);

function handleLoaded(e:Event):void {
  loaded = e.target.content;
}

load1.addEventListener(MouseEvent.CLICK, handleClick);

function handleClick(e:MouseEvent):void {
  if (loaded) {
    loaded.gotoAndPlay("outro");
  }

  //other content here.
}

```

this simple external test swf has 10 frames. @ frame 1 theres a “intro” label, @ frame 5 theres a “stop” action, and on frame 6, theres an “outro” label.

problem is that, when i click the button, it RE-imports the external swf and plays from frame 1.

any ideas/tips/hints etc or heck, even a better way to do it, id gladly appreciate. thanks in advance.
