Actionscript (Flash) works with a class called Sharedobject, which is not necessarily Localstorage (which is an HTML5 object). You can use either local "cookies" or in a Media server and even view streams like sounds and videos.
This class creates a file known as SOL ARCHIVE (Shared Object Local, . sun), located only in the folder "%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 continue there.
Be careful when creating this type of file for passwords, encryption and the like. With the wrong configuration you may be exposing all your code.
Why did they give me -1?
– noNihongo
Probably because initial ignorance is easily solved by Google. The subsequent is the interesting: "Cookie in Flash gives mefistofoles dick". Anyway, it seems to me, I didn’t vote or + nor -. Oh, yeah, if I remember correctly, the Flash works with Localstorage.
– brasofilo
@Brasofilo, regarding his "why the initial ignorance is easily solved by Google", did not find an answer that meets my need. If you so well-known, why don’t you help me?
– noNihongo
@brasofilo I believe that even questions of this type are important for the site we will assume that a flash beginner type the above title in Google which by the way is very consistent to doubt, he will find easy this page, so I don’t think we should have this attitude towards the person who asked! and vote to delete all such comments as soon as possible
– Tuyoshi Vinicius
Wow, didn’t I give you a password to research? I, huh, then there’s that cry "It has to be mandatory to explain the downvote", someone explains and still takes whack... Out on the left, I went..!
– brasofilo
Which one? "metisfofoles" and "Localstorage".
– noNihongo
This type of question, which asks how to do something without showing one’s own attempt, is somewhat controversial (participate in the discussion which we have already had on the subject). Otherwise, the question was extremely misspelled, and no form of question had. I believe that this may have led to at least part of the opposing votes. I edited to fix it and I’m voting to reopen; now it’s in the hands of the community.
– bfavaretto