Hi.

I'm trying to make a SharedObject for storing small data on the users harddrive. Max usage should probably be 2-3 kB.

I've been working with the example found here: http://livedocs.adobe.com/flash/9.0/...xamplesSummary and it seems to work. Only thing that doesn't really work is the error handling. I tried setting that my domain wasn't allowed to store anything, and it popped up a dialog asking for permission, which is the intended behavior.

my code looks like this:
code:

private function write():void {
var flushStatus:String;
try {
flushStatus = _so.flush();
} catch(error:Error) {
trace("Unable to write contents to disk!");
}

if(flushStatus != null) {
switch(flushStatus) {
case SharedObjectFlushStatus.PENDING:
trace("Requesting permission to save object...");
_so.addEventListener(NetStatusEvent.NET_STATUS, onFlushStatus);
break;
case SharedObjectFlushStatus.FLUSHED:
trace("Value flushed to disk.");
break;
}
}
}

private function onFlushStatus(event:NetStatusEvent):void {
trace("User closed permission dialog...");
switch(event.info.code) {
case "SharedObject.Flush.Success":
trace("User granted permission -- value saved.");
break;
case "SharedObject.Flush.Failed":
trace("User denied permission -- value not saved.\n");
break;
}
_so.removeEventListener(NetStatusEvent.NET_STATUS, onFlushStatus);
}



If I click "Allow" when the dialog pops up, it works perfectly. But when I press "deny", I get am error message "Error #2044: Unhandled NetStatusEvent:. level=error, code=SharedObject.Flush.Failed", which I'm not sure how to handle. Tried adding a eventlistener, and a catch-block, but none of them worked.