Passing variables in from the flash file

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.


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?


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

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