# Is it Posibble question of the day:Variables and Arrays

**URL:** <https://forum.kirupa.com/t/is-it-posibble-question-of-the-day-variables-and-arrays/65835>\
**Category:** flash\
**Created:** [September 29, 2004, 10:47pm UTC](https://forum.kirupa.com/t/is-it-posibble-question-of-the-day-variables-and-arrays/65835 "2004-09-29T22:47:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![worm](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/worm/32/235_2.png) [@worm](https://forum.kirupa.com/u/worm)\
**Post date:** [September 29, 2004, 10:47pm UTC](https://forum.kirupa.com/t/is-it-posibble-question-of-the-day-variables-and-arrays/65835/1 "2004-09-29T22:47:22Z")

</div>

Is it possible to get values for a variable from an array.  
How would i do this? Also, working examples would be great if u guys know of any.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 12:25am UTC](https://forum.kirupa.com/t/is-it-posibble-question-of-the-day-variables-and-arrays/65835/2 "2004-09-30T00:25:19Z")

</div>

u can do this with classes much easier a simple random code for the switch you know. if this isnt an option i at least put it back to the top of the forums.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 1:32pm UTC](https://forum.kirupa.com/t/is-it-posibble-question-of-the-day-variables-and-arrays/65835/3 "2004-09-30T13:32:20Z")

</div>

> [@worm](#):
>
> Is it possible to get values for a variable from an array.

Do you mean that you want a variable to take the value of a given element of an array? If so:

```auto
my_array = [10, 50, 44, 43] ;
var a = my_array[2] ;
trace (a) ; // returns 44

```
