# Variable holds property?

**URL:** <https://forum.kirupa.com/t/variable-holds-property/261918>\
**Category:** flash\
**Created:** [June 1, 2008, 7:33pm UTC](https://forum.kirupa.com/t/variable-holds-property/261918 "2008-06-01T19:33:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![komapeb](https://avatars.discourse-cdn.com/v4/letter/k/8e7dd6/32.png) [@komapeb](https://forum.kirupa.com/u/komapeb)\
**Post date:** [June 1, 2008, 7:33pm UTC](https://forum.kirupa.com/t/variable-holds-property/261918/1 "2008-06-01T19:33:16Z")

</div>

Hi! (-:

Here’s some code:

```auto
var Val = alpha;
_mc.Val = somenumber;

```

So (it’s hard to explain and mine english isn’t good so excuse me please) in the variable “Val” i want to store not the value of “alpha” or “x”, “y” etc. but the name of the property itself (alpha, x, y etc.) and to use it on objects (MovieClips) like the example above. Is this possible?

---

<div class="post-metadata">

**Author:** ![johnfn](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@johnfn](https://forum.kirupa.com/u/johnfn)\
**Post date:** [June 1, 2008, 8:31pm UTC](https://forum.kirupa.com/t/variable-holds-property/261918/2 "2008-06-01T20:31:48Z")

</div>

I think all you need is this:

```auto

var d = "alpha"

test[d] = .5;

```

---

<div class="post-metadata">

**Author:** ![Alex\_Lexcuk](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@Alex\_Lexcuk](https://forum.kirupa.com/u/Alex_Lexcuk)\
**Post date:** [June 1, 2008, 8:35pm UTC](https://forum.kirupa.com/t/variable-holds-property/261918/3 "2008-06-01T20:35:56Z")

</div>

[http://murmadillo.tut.su/fla/tween\_event.swf](http://murmadillo.tut.su/fla/tween_event.swf)  
[http://murmadillo.tut.su/fla/tween\_event.zip](http://murmadillo.tut.su/fla/tween_event.zip)

---

<div class="post-metadata">

**Author:** ![komapeb](https://avatars.discourse-cdn.com/v4/letter/k/8e7dd6/32.png) [@komapeb](https://forum.kirupa.com/u/komapeb)\
**Post date:** [June 1, 2008, 8:48pm UTC](https://forum.kirupa.com/t/variable-holds-property/261918/4 "2008-06-01T20:48:36Z")

</div>

johnfn 10q verry much! That helped me a lot!
