I would like to store the variables in an encrypted local store. This example works, but how to expand it to save more than 1 variable?
// To save variable to ELS (EncryptedLocalStore) function saveItems() { var m1:String = "my item 1"; // HOW TO ADD THESE?: // var m2:String = "my item 2"; // var m3:String = "my item 3"; // var m4:String = "my item 4"; // var bytes:ByteArray = new ByteArray(); bytes.writeUTFBytes(m1); EncryptedLocalStore.setItem("item1", bytes); } // Read it from ELS function getItems() { var storedValue:ByteArray = EncryptedLocalStore.getItem("item1"); // trace(storedValue.readUTFBytes(storedValue.length)); }
Thanks.
source share