# Shared object question

**URL:** <https://forum.kirupa.com/t/shared-object-question/206557>\
**Category:** Uncategorized\
**Created:** [November 9, 2006, 8:37am UTC](https://forum.kirupa.com/t/shared-object-question/206557 "2006-11-09T08:37:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fried](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@fried](https://forum.kirupa.com/u/fried)\
**Post date:** [November 9, 2006, 8:37am UTC](https://forum.kirupa.com/t/shared-object-question/206557/1 "2006-11-09T08:37:04Z")

</div>

Hi guys,

I have created a new shared object:

mySharedObject=SharedObject.getLocal(“userData”);

I just would like to know when creating a new stored value, can you assign this value dynamically.  
For instance when the user presses a button instead of having:

```auto
scorebut.onPress = function(){
                     mySharedObject.data.score = 12;
}

```

The variable 12 would not be hard coded. This value could be parsed from an XML file? Thanks in advance.
