Development Flex


    
        
            private var lso : SharedObject;
            private function removeSharedObject() : void
            {
               var sampleData1 : String = "data1";
               var sampleData2 : String = "data2";
               lso = SharedObject.getLocal( "mylso" );
               lso.data.someData1 = sampleData1;
               lso.data.someData2 = sampleData2;
               lso.data.someData3 = "sampleData2";
               lso.flush();
               status.text = "\ndata1: " + lso.data.someData1
                             + "\ndata2: " + lso.data.someData2
                             + "\ndata3: " + lso.data.someData3;
               delete lso.data.someData1;
               status.text += "\n\nlso after deleting lso.data.someData1" 
                              + "\ndata1:"  + lso.data.someData1 
                              + "\ndata2:" + lso.data.someData2
                              + "\ndata3:" + lso.data.someData3;
               lso.clear();
               status.text += "\n\nlso data after calling clear()" + 
                              "\ndata1: " + lso.data.someData1 + 
                              "\ndata2: " + lso.data.someData2 + 
                              "\ndata3: " + lso.data.someData3;
            }