Variables in actions

I don’t know if I will be able to explain this properly, but what I want to know is if my actions can contain variables in something like: root.my_mc.(“variable”)…

What I want to do is a game, were you have controls and move you character with your arrows… but when i use the hittest, it makes the character bounce “._x” and I want it to change according on where the character is moving.

If for example I press the “up” button, the character will move and the variable “direction” will change from “._x” to “._y” so that the hittest action changes the bounce direction.

What actionscript should I use to change that property?

Thanks in advance!

:stuck_out_tongue: