|
|
|
|
metin alanlarını cache (hafıza) alma
|
14.09.2009 10:56:54
|
|
site yada oyunlarda kullanıcıya kolaylık sağlamak için metin alanlarını cache (hafızaya) almanız gerekebilir ve bunu SharedObject ile sağlayabilirsiniz.
Kullanmanız gereken gerekli kod;
var user:String = ""; var pass:String = ""; var so:SharedObject = SharedObject.getLocal("giris"); if (so.data.user != undefined) { user = so.data.user; gotoAndStop (2); } function onClick (evt:MouseEvent):void { so.data.user = user_txt.text; user = user_txt.text; gotoAndStop (2); }
giris_btn.addEventListener (MouseEvent.CLICK,onClick);
Kaynak Dosya
|
|
|
|
|
|