13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Storing local data<br />

Accessing data in the <strong>en</strong>crypted local store<br />

Adobe AIR 1.0 and later<br />

You can retrieve a value from the <strong>en</strong>crypted local store by using the EncryptedLocalStore.getItem() method, as<br />

in the following example:<br />

var storedValue:ByteArray = EncryptedLocalStore.getItem("firstName");<br />

trace(storedValue.readUTFBytes(storedValue.l<strong>en</strong>gth)); // "Bob"<br />

Removing data from the <strong>en</strong>crypted local store<br />

Adobe AIR 1.0 and later<br />

You can delete a value from the <strong>en</strong>crypted local store by using the EncryptedLocalStore.removeItem() method,<br />

as in the following example:<br />

EncryptedLocalStore.removeItem("firstName");<br />

You can clear all data from the <strong>en</strong>crypted local store by calling the EncryptedLocalStore.reset() method, as in the<br />

following example:<br />

EncryptedLocalStore.reset();<br />

Last updated 6/6/2012<br />

712

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!