# Shared object question

**URL:** <https://forum.kirupa.com/t/shared-object-question/206556>\
**Category:** flash\
**Created:** [November 9, 2006, 8:35am UTC](https://forum.kirupa.com/t/shared-object-question/206556 "2006-11-09T08:35:50Z")\
**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:35am UTC](https://forum.kirupa.com/t/shared-object-question/206556/1 "2006-11-09T08:35:50Z")

</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;
}

```

Is it possible getting the value from an XML file? So the variable 12 would not be hard coded.
