# Shared Objects Help

**URL:** <https://forum.kirupa.com/t/shared-objects-help/77044>\
**Category:** flash\
**Created:** [January 24, 2005, 1:50am UTC](https://forum.kirupa.com/t/shared-objects-help/77044 "2005-01-24T01:50:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Heero\_Yuy](https://avatars.discourse-cdn.com/v4/letter/h/439d5e/32.png) [@Heero\_Yuy](https://forum.kirupa.com/u/Heero_Yuy)\
**Post date:** [January 24, 2005, 1:50am UTC](https://forum.kirupa.com/t/shared-objects-help/77044/1 "2005-01-24T01:50:42Z")

</div>

I’ve read the tutorials and posts and nothing I do seems to work.

I’m doing a flash site and I have different skins for it. For the sake of understanding, I have 2 buttons, a default one and a blue one. When I click on the blue one, the background color changes to blue and if you close the swf and reopen it, I want the blue background to appear.

The background is in an MC named “bg” and all the colors will be on a diff frame inside of it.

Here’s what I have for the first frame:

```auto
visitor = SharedObject.getLocal("skin_pref");
if (visitor.data.skin == undefined) {
	visitor.data.skin == skindefault;
	visitor.flush();
} else if (visitor.data.skin == skinblue) {
	bg.gotoAndStop("blue");
}

```

On the blue button I have this code:

```auto
on (release) {
	visitor.data.skin == skinblue;
	bg.gotoAndStop("blue");
        visitor.flush();
}

```

I have no idea why it’s not working, it looks right to me and I’ve spent countless hours trying different things. Can someone please help?
