 {
 	import flash.display.BitmapData;
 	import flash.events.Event;
+	import flash.events.NetStatusEvent;
 	import flash.external.ExternalInterface;
 	import flash.net.SharedObject;
+	import flash.net.SharedObjectFlushStatus;
 	import flash.utils.ByteArray;
 	import flash.utils.getQualifiedClassName;
 	

			if (saved)
			{
				// delete session history from shared object
				delete obj.data[uid];
				flush = true;
				
				// restore old session history
				loadWeaveFileContent(saved.content);

			if (weaveContent is WeaveArchive)
				weaveContent = (weaveContent as WeaveArchive).serialize();
			obj.data[uid] = { date: new Date(), content: weaveContent };
			
			if (obj.flush() == SharedObjectFlushStatus.PENDING)
				obj.addEventListener(NetStatusEvent.NET_STATUS, handleExternalReloadStatus);
			else
				handleExternalReloadStatus();
			
			function handleExternalReloadStatus(event:NetStatusEvent = null):void
			{
				if (event && event.info.code != 'SharedObject.Flush.Success')
				{
					reportError(EXTERNAL_RELOAD_ERROR);
					return;
				}
				obj.close();
				
				// reload the application
				if (ExternalInterface.objectID)
					ExternalInterface.call(
						"function(reloadID) {" +
