# \_root.variable.variable possible?

**URL:** <https://forum.kirupa.com/t/-root-variable-variable-possible/268292>\
**Category:** flash\
**Created:** [August 12, 2008, 10:30am UTC](https://forum.kirupa.com/t/-root-variable-variable-possible/268292 "2008-08-12T10:30:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![four4swords](https://avatars.discourse-cdn.com/v4/letter/f/87869e/32.png) [@four4swords](https://forum.kirupa.com/u/four4swords)\
**Post date:** [August 12, 2008, 10:30am UTC](https://forum.kirupa.com/t/-root-variable-variable-possible/268292/1 "2008-08-12T10:30:56Z")

</div>

hi,

could i have a variable… which goes along the lines of something like this…

```php
_root.player1.attack = "one";

```

i’ve tried it… maybe i can… but i’m doing it wrong?

“player1” is a variable as is “attack”…

or do i have to make it

```php
_root.player1_attack = "one"

```

or something like that for it to work?

Is there a way to make the first example work? cause it’ll definitely make things a lot easier! lol
