  */
 public class LocalStorage
 {
-	
+
 	/**
 	 * Constructor.
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 *  @flexjsignoreimport window
-	 */
-	public function LocalStorage() 
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 *  @flexjsignoreimport window
+	 */
+	public function LocalStorage()
 	{
 		COMPILE::AS3 {
 			try {

				result = false;
			}
		}
		
		return result;
	}
	
	/**
	 * Stores a value with a key. The value may be converted to a String, depending
	 * on the platform.
	 *  
	 *  @langversion 3.0
	 *  @playerversion Flash 10.2
	 *  @playerversion AIR 2.6
	 *  @productversion FlexJS 0.0
	 *  @flexjsignoreimport window
	 */
	public function setValue(key:String, value:Object) : Boolean
	{
		if (!storageAvailable()) return false;
				
		COMPILE::AS3 {
			sharedObject.data[key] = value;
			sharedObject.flush();
		}
		
		COMPILE::JS {
			window.localStorage[key] = value;
		}
		
		return true;
	}
	
	/**
	 * Returns the value associated with the key, or undefined if there is
	 * no value stored. Note that a String version of the value may have been
	 * stored, depending on the platform.
	 *  
	 *  @langversion 3.0
	 *  @playerversion Flash 10.2
	 *  @playerversion AIR 2.6
	 *  @productversion FlexJS 0.0
	 *  @flexjsignoreimport window
	 */
	public function getValue(key:String) : Object
	{
		if (!storageAvailable()) return null;
		
		var result:Object = null;
		
		COMPILE::AS3 {
			result = sharedObject.data[key];
		}
		
		COMPILE::JS {
			result = window.localStorage[key];
		}
		
		return result;
	}
	
	/**
	 * Removed the value and, possibly, the key from local storage. On some
	 * platforms, retriving the value after removing it will be an error, on
	 * others it may return undefined or null.
	 *  
	 *  @langversion 3.0
	 *  @playerversion Flash 10.2
	 *  @playerversion AIR 2.6
	 *  @productversion FlexJS 0.0
	 *  @flexjsignoreimport window
	 */
	public function removeValue(key:String) : Boolean
	{
		if (!storageAvailable()) return null;
				
		COMPILE::AS3 {
			delete sharedObject.data[key];
			sharedObject.flush();
		}
		
		COMPILE::JS {
			window.localStorage[key] = null;
		}
		
		return true;
	}
	
	/**
	 * Returns true if there is a value stored for the key.
	 *  
	 *  @langversion 3.0
	 *  @playerversion Flash 10.2
	 *  @playerversion AIR 2.6
	 *  @productversion FlexJS 0.0
	 *  @flexjsignoreimport window
	 */
	public function hasValue(key:String) : Boolean
	{
		if (!storageAvailable()) return false;
		
		var result:Boolean = false;
		
		COMPILE::AS3 {
			result = sharedObject.data.hasOwnProperty(key);
		}
		
		COMPILE::JS {
			result = (window.localStorage[key] !== null);
		}
		
		return result;
	}
}
}
			}
		}
	}

	COMPILE::AS3
	private var sharedObject:SharedObject;

	/**
	 * Returns true if the platform provides local storage.
	 *
	 *  @langversion 3.0
	 *  @playerversion Flash 10.2
	 *  @playerversion AIR 2.6
