# Passing Variables to dynamically loaded SWF's

**URL:** <https://forum.kirupa.com/t/passing-variables-to-dynamically-loaded-swfs/268109>\
**Category:** Uncategorized\
**Created:** [August 9, 2008, 10:00pm UTC](https://forum.kirupa.com/t/passing-variables-to-dynamically-loaded-swfs/268109 "2008-08-09T22:00:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DesignerMichael](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@DesignerMichael](https://forum.kirupa.com/u/DesignerMichael)\
**Post date:** [August 9, 2008, 10:00pm UTC](https://forum.kirupa.com/t/passing-variables-to-dynamically-loaded-swfs/268109/1 "2008-08-09T22:00:42Z")

</div>

I seem to be having a problem passing variables to dynamically loaded swfs. My crossdomain.xml allows the loader to access the game, however the game cannot access the loader… Just so you know. 🙂 So using root/stage in the game movie is a no-go.

Heres my loader code:

```auto
gameLoader.load(request);
function loadComplete(e:Event) {
    var Game:MovieClip = new MovieClip();
    Game = MovieClip(gameLoader.content);
    Game.userId = 19717633;
    addChild(Game);
}

```

Heres my test code on timeline of the loaded game movieclip…

```auto

var userId;
testText.text = String(userId);

```

Undefined… 😕
