# Loading external SWF sending vars Problem!

**URL:** <https://forum.kirupa.com/t/loading-external-swf-sending-vars-problem/252020>\
**Category:** Uncategorized\
**Created:** [February 14, 2008, 11:01pm UTC](https://forum.kirupa.com/t/loading-external-swf-sending-vars-problem/252020 "2008-02-14T23:01:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SonicRio](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@SonicRio](https://forum.kirupa.com/u/SonicRio)\
**Post date:** [February 14, 2008, 11:01pm UTC](https://forum.kirupa.com/t/loading-external-swf-sending-vars-problem/252020/1 "2008-02-14T23:01:34Z")

</div>

Hi,

I’m trying to load an external SWF to my movie and send  
some variables to it. Here’s my code:

```auto

    var externalLoader:Loader = new Loader();
    var variable:URLVariables = new URLVariables();

    var request:URLRequest = new URLRequest("external.swf");

    variable.test = "10";
    request.data = variable;
    
    externalLoader.load(request);
    externalLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, preloaderFunction);
    externalLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeFunction);

    target_mc.addChild(externalLoader);

```

when I add the **test** variable to the URLVariables it returns the following error:

> Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

If I comment the line [variable.test = “10”;], it loads fine but without sending the test variable.

Note: The external.swf is an AS2 file but I think this isn’t a problem.

Does anybody can help me?  
Thanks
