Copy link to clipboard
Copied
How can I local store something (like a highscore) with my android app ? (written with flash cs6) ?
SharedObjects doesn't really work...
try:
var sharedObject:SharedObject;
sharedObject = SharedObject.getLocal('trtrtrtrtrtr');
if(sharedObject.data.userName){
// display data in a textfield to confirm your so worked.
} else {
sharedObject.data.userName = "msmsmsmsmsmsmsm";
sharedObject.data.age = 24;
sharedObject.flush();
}
Copy link to clipboard
Copied
why doesn't sharedobject do what you want?
Copy link to clipboard
Copied
Hi,
thx for your answer!
I tried it with this code:
var sharedObject:SharedObject;
sharedObject = SharedObject.getLocal('trtrtrtrtrtr');
sharedObject.data.userName = "msmsmsmsmsmsmsm";
sharedObject.data.age = 24;
sharedObject.flush();
After starting this app... i tried to find the file "trtrtrtrtrtr" on the tablet.
But I didn't find it...
Is it my mistake?
Thank you!
Copy link to clipboard
Copied
try:
var sharedObject:SharedObject;
sharedObject = SharedObject.getLocal('trtrtrtrtrtr');
if(sharedObject.data.userName){
// display data in a textfield to confirm your so worked.
} else {
sharedObject.data.userName = "msmsmsmsmsmsmsm";
sharedObject.data.age = 24;
sharedObject.flush();
}
Copy link to clipboard
Copied
ok,
nevertheless I dont find the file: trtrtrtrtrtr
on the android-tablet where i try out the app.
Or is it not possible to find this file ?
(Total Commander)
Copy link to clipboard
Copied
it's probably possible to find the file but if you need help with total commander check elsewhere. or, make it easy on yourself and use a textfield to test like i suggested.
Copy link to clipboard
Copied
Thanks, i couldn't believe it without to see the file... but it works - great!
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now