# Communicate with external loaded SWF

**URL:** <https://forum.kirupa.com/t/communicate-with-external-loaded-swf/305942>\
**Category:** Uncategorized\
**Created:** [March 5, 2010, 11:37pm UTC](https://forum.kirupa.com/t/communicate-with-external-loaded-swf/305942 "2010-03-05T23:37:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrRobot](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/drrobot/32/3907_2.png) [@DrRobot](https://forum.kirupa.com/u/DrRobot)\
**Post date:** [March 5, 2010, 11:37pm UTC](https://forum.kirupa.com/t/communicate-with-external-loaded-swf/305942/1 "2010-03-05T23:37:10Z")

</div>

I am building a highscore system for my site, and I was wondering how to communicate with classes that are included in an external swf that i’ve loaded in.

Basically, how does mindjolt do this:

```php

var urlLoader:Loader = new Loader();
  urlLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadFinished);
  urlLoader.load(new URLRequest(gameParams.mjPath || "http://static.mindjolt.com/api/as3/api_as3_local.swf"));
  this.addChild(urlLoader);
  function loadFinished (e:Event):void {
    MindJoltAPI=e.currentTarget.content;
    if (MindJoltAPI != null) {
      MindJoltAPI.service.connect(postMindJoltAPIConnect);
      trace ("[MindJoltAPI] service successfully loaded");
    } else {
      trace("[MindJoltAPI] failed to load");
    }
  }

```

then somehow they can do this:

```php

MindJoltAPI=e.currentTarget.content;
    //and this
      MindJoltAPI.service.connect(postMindJoltAPIConnect); 

```

How do they/I do that?
