# SharedObjects + variables question

**URL:** <https://forum.kirupa.com/t/sharedobjects-variables-question/213551>\
**Category:** flash\
**Created:** [January 20, 2007, 8:06pm UTC](https://forum.kirupa.com/t/sharedobjects-variables-question/213551 "2007-01-20T20:06:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thecheez](https://avatars.discourse-cdn.com/v4/letter/t/b3f665/32.png) [@thecheez](https://forum.kirupa.com/u/thecheez)\
**Post date:** [January 20, 2007, 8:06pm UTC](https://forum.kirupa.com/t/sharedobjects-variables-question/213551/1 "2007-01-20T20:06:21Z")

</div>

Hi guys, first post here so “Howdy all!” 🙂

Just got a quickie, wondering if someone could let me know how likely this is to happen:

I just stared delving into arrays and sharedObjects and I would like to be able to add array data to a sharedObject file (which i got working) BUT I would like to add it to an attribute based on a number variable i declare elsewhere in my script. I’ll try to explain:

[num\_items] is a numerical variable i have declared elsewhere  
[lib\_so] is my sharedObject  
[new\_array] is my array data

so i’d like to add it kinda like this:  
lib\_so.data.[num\_items] = new\_array;

where [num\_items] is eg. 5 or whatever (the num\_items is increased in the same function and so the next set of data is added under 6 and so on).

Is this possible? Any help appreciated

Thanks, Mike

Edit: This is in Flash8 btw 🙂
