# Please help with alpha and sharedObject

**URL:** <https://forum.kirupa.com/t/please-help-with-alpha-and-sharedobject/330547>\
**Category:** Uncategorized\
**Created:** [February 7, 2013, 5:19am UTC](https://forum.kirupa.com/t/please-help-with-alpha-and-sharedobject/330547 "2013-02-07T05:19:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eggblade](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@eggblade](https://forum.kirupa.com/u/eggblade)\
**Post date:** [February 7, 2013, 5:19am UTC](https://forum.kirupa.com/t/please-help-with-alpha-and-sharedobject/330547/1 "2013-02-07T05:19:10Z")

</div>

What I’m trying to make is an.swf file that contained a movieclip named yellow,when I clicked on it,yellow will disappear,and when I open the .swf again,yellow will still be invisible,here’s my code :

```auto

var mySO:SharedObject = SharedObject.getLocal("sftest");

yellow.alpha = mySO.data.poptut;
 
 if (!mySO.data.poptut) {
yellow.alpha = 1;
}

yellow.addEventListener(MouseEvent.CLICK,clickyellow);
function clickyellow (e:MouseEvent):void{
    yellow.alpha = 0;
    mySO.data.poptut = yellow.alpha;
    mySO.data.flush();
    
}

```

I can’t seem to got it work,the yellow is disappearing but won’t store it into sharedObject,what I got is this:

```auto

TypeError: Error #1006: flush is not a function.
    at so_fla::MainTimeline/clickyellow()

```

:puzzled:

Thank you for your help
