# Passing variables in from the flash file

**URL:** <https://forum.kirupa.com/t/passing-variables-in-from-the-flash-file/265485>\
**Category:** Uncategorized\
**Created:** [July 9, 2008, 2:59pm UTC](https://forum.kirupa.com/t/passing-variables-in-from-the-flash-file/265485 "2008-07-09T14:59:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navarone](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@Navarone](https://forum.kirupa.com/u/Navarone)\
**Post date:** [July 9, 2008, 2:59pm UTC](https://forum.kirupa.com/t/passing-variables-in-from-the-flash-file/265485/1 "2008-07-09T14:59:15Z")

</div>

I am trying to pass a variable into my flash from my html code. In my html flash code I have a variable “id” with a value:hotels.

```auto

hotel_carousel.swf?id=hotels

```

In my flash movie I want to use the value “hotels” in my xml.load() funtion. But I am having some trouble and I think it has to do with strings. But I am not sure. Can someone help?

```auto

//id = "hotels"
trace("id = "+id);
mydataText.text = id;
//...xml code here
xml.load(id+".xml");
//xml.load("hotels.xml");

```

---

<div class="post-metadata">

**Author:** ![tfoston](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tfoston/32/2516_2.png) [@tfoston](https://forum.kirupa.com/u/tfoston)\
**Post date:** [July 10, 2008, 1:29am UTC](https://forum.kirupa.com/t/passing-variables-in-from-the-flash-file/265485/2 "2008-07-10T01:29:07Z")

</div>

query string variables are created at the \_root level, so make sure you use that scope if not on the \_root level e.i \_root.id
