# Communicate with components of an external swf

**URL:** <https://forum.kirupa.com/t/communicate-with-components-of-an-external-swf/264796>\
**Category:** flash\
**Created:** [June 30, 2008, 5:13pm UTC](https://forum.kirupa.com/t/communicate-with-components-of-an-external-swf/264796 "2008-06-30T17:13:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gunsofthomaso](https://avatars.discourse-cdn.com/v4/letter/g/58956e/32.png) [@gunsofthomaso](https://forum.kirupa.com/u/gunsofthomaso)\
**Post date:** [June 30, 2008, 5:13pm UTC](https://forum.kirupa.com/t/communicate-with-components-of-an-external-swf/264796/1 "2008-06-30T17:13:47Z")

</div>

I’ve got an AS3 swf that loads an AS2 swf using the Loader class. The AS2 swf has a component in it in which i need to assign a parameter to from the AS3 swf. Here’s an example of what my code looks like:

```auto

var loader = new Loader();
loader.load(new URLRequest("as2.swf"));
addChild(loader);

MovieClip(loader.content).as2_component.xmlFilePath="xmlfile.xml";

```

I get an error. Please someone point me in a better direction. How do i make this work?

---

<div class="post-metadata">

**Author:** ![gunsofthomaso](https://avatars.discourse-cdn.com/v4/letter/g/58956e/32.png) [@gunsofthomaso](https://forum.kirupa.com/u/gunsofthomaso)\
**Post date:** [June 30, 2008, 8:39pm UTC](https://forum.kirupa.com/t/communicate-with-components-of-an-external-swf/264796/2 "2008-06-30T20:39:03Z")

</div>

So i discovered the only way to communicate between two swfs is through the LocalConnection Class, or a component called ActionScript Bridge, or a scripting method known as SWF Bridge. Not being a programmer, these are all very confusing. If someone could simplify, it would be greatly appreciated.
