# Shared objects problem

**URL:** <https://forum.kirupa.com/t/shared-objects-problem/230152>\
**Category:** Uncategorized\
**Created:** [June 23, 2007, 4:30am UTC](https://forum.kirupa.com/t/shared-objects-problem/230152 "2007-06-23T04:30:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alesspunk](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@alesspunk](https://forum.kirupa.com/u/alesspunk)\
**Post date:** [June 23, 2007, 4:30am UTC](https://forum.kirupa.com/t/shared-objects-problem/230152/1 "2007-06-23T04:30:24Z")

</div>

HI. i m try to use shared object but if i use MovieClip.loadMovie is not working so well

this is my example

```php
#include "lmc_tween.as"

var so:SharedObject = SharedObject.getLocal("setbgcolor");
if (so.data.bgcolor != undefined) { setcolor(so.data.bgcolor);
}
function setcolor(color) {
 _root.bg.colorTo(color, .4, "linear"); //HERE IS THE PROBLEM. IS NOT SAVING WHEN I LOAD IN ANOTHER MOVIECLIP
 _root.cont.mc.colorTo(color, .4, "linear");
 so.data.bgcolor = color;
 so.flush();
}
cont.loadMovie("carga.swf");

```

my button script

```php
on(press){
 _root.setcolor(0x0000FF);
}

```

my bg movie clip who is loaded in my root, capture fine the values when close and open again the fla. But my movieclip who is loaded by loadMovie not got the same look.

Any possible solution for this guys

i appreciate a lot any help!

regards

aless
