ActionScript (Flash) works with a class called SharedObject , which is not necessarily LocalStorage (which is an HTML5 object). You can use both local cookies and a Media Server and even even displaying streams like sounds and videos.
This class creates a file known as SOL File , located only in the "% appData% / Macromedia / Flash Player / # SharedObjects / _pasta_com_id_ / ", containing values of Boolean, String, Number, int, and Array variables.
To use this method, follow the code below:
var so:SharedObject = SharedObject.getLocal("NomeDoArquivoSol");
so.data.nome = "SeuNome";
so.data.numero = 20;
var nome:String = so.data.nome;
var numero:int = so.data.numero;
trace(so.data.nome); //SeuNome
trace(so.data.numero); //20
trace(nome); //SeuNome
trace(numero); //20
Soon after this file is created it can be accessed at any time, even if you close the swf and open it again, the values will still be there.
Be careful when creating this type of file for passwords, encryptions, and the like. With the wrong configuration you may be exposing all your code.