# \_root path using variable?

**URL:** <https://forum.kirupa.com/t/-root-path-using-variable/223667>\
**Category:** Uncategorized\
**Created:** [April 24, 2007, 7:46pm UTC](https://forum.kirupa.com/t/-root-path-using-variable/223667 "2007-04-24T19:46:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![omnislant](https://avatars.discourse-cdn.com/v4/letter/o/a88e57/32.png) [@omnislant](https://forum.kirupa.com/u/omnislant)\
**Post date:** [April 24, 2007, 7:46pm UTC](https://forum.kirupa.com/t/-root-path-using-variable/223667/1 "2007-04-24T19:46:26Z")

</div>

basically i’ve got a inbox type gig set up, and when you log in, php checks the passwords, and sends the first ten message’s information back to the flash file, using a loop such that the subject of the first message would be 1\_subject, the second 2\_subject, and so on.

in the swf, when you click inbox, it creates 10 dynamic “message” movieclips in a loop, where the first would be “message1”, the second “message2”, etc. inside each clip is a code that strips “message” away, leaving just the number (x=1, x=2, etc), but it’s in string format, if that matters…

when i try the following:

subject = “\_root.”+x+"\_subject"; //it actually prints “\_root.1\_subject” instead of the actual subject for message one

or

subject = \_root.x+"\_subject"; //it prints “undefined\_subject”

anybody know how i should fix this??

thanks for the help
