This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private var so:SharedObject = SharedObject.getLocal("Demo"); | |
public function saveResClass(cls:Class):void | |
{ | |
this.storeValue("lastClass", getQualifiedClassName(db)); | |
} | |
public function loadResClass():Class | |
{ | |
var className:String = so.data["lastClass"]; | |
var c:Class; | |
if (className && | |
className != "") | |
c = getDefinitionByName(className) as Class; | |
else | |
trace ("No class saved previously"); | |
return c; | |
} | |
public function storeValue(key:String, value:Object):void | |
{ | |
so.data[key] = value; | |
so.flush(); | |
} |
Posting Komentar