1 Reply Latest reply on Sep 9, 2010 1:58 PM by www0z0k

    Error #2130

    Ballinamuck
      I'm getting a report of a client receiving error #2130, Unable to flush SharedObject. It happens to all users at the specific site, but we have not had any other reports of it. All other users do not have a problem. I cannot recreate this error either. Has anyone ever run into this? Or does anyone know what is causing it? All I can find online is a bug report here on Adobe's web site. Thank you.
        • 1. it might be a hack, but it works
          www0z0k

          afaik this error exists only in AVM2 so i solved it like this:

           

          1. created an AS2 file (as2so.swf) with the following code:

           

          var lc:LocalConnection = new LocalConnection();
          lc.allowDomain('*');
          lc.connect(conname);
          trace("conname = " + conname);
          lc.toSo = function(so:SharedObject) {
              so.flush();
          };
          lc.killSo = function(so:SharedObject){
              so.clear();
          }

           

          2. created an AS3 class in my project:

           

          public class SOWriter{
                   private static var _ready: Boolean = false;
                   private static var ldr: Loader;
                   private static var connID:String;
                   private static var lc: LocalConnection;
                   public function SOWriter() {
                       trace('static class');
                   }
                  
                   public static function get ready():Boolean { return _ready; }
                  
                   public static function init():void {
                       lc = new LocalConnection();
                       lc.allowDomain('*');
                       lc.addEventListener(StatusEvent.STATUS, onStatus);
                       ldr = new Loader();
                       connID = '__' + Date.UTC;
                       ldr.contentLoaderInfo.addEventListener(Event.INIT, onInit);
                       ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onErr);
                       ldr.load(new URLRequest('as2so.swf?conname=' + connID));
                   }
                  
                   private static function onErr(e:Event):void { }
                  
                   private static function onStatus(e:StatusEvent):void { }
                  
                   private static function onInit(e:Event):void {
                       _ready = true;
                   }
                  
                   public static function write2SO(so:SharedObject):void {
                       lc.send(connID, 'toSo', so);
                   }
                  
                  public static function killSo(so:SharedObject):void {
                       lc.send(connID, 'killSo', so);
                   }
                  
            }

           

          3. never seen this error again:

           

          SOWriter.init();

           

          if(SOWriter.ready){

               var SO: SharedObject = SharedObject.getLocal('id1');

               SOWriter.killSo(SO);

               SO.data.value = 'value';

               SOWriter.write2SO(SO);

          }

           

           

          maybe someone still needs this solution