Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

flash cs6 - local store for android app

Explorer ,
Jun 12, 2013 Jun 12, 2013

How can I local store something (like a highscore) with my android app ? (written with flash cs6) ?

SharedObjects doesn't really work...

TOPICS
ActionScript
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 12, 2013 Jun 12, 2013

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();

}


 

Translate
Community Expert ,
Jun 12, 2013 Jun 12, 2013

why doesn't sharedobject do what you want?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 12, 2013 Jun 12, 2013

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2013 Jun 12, 2013

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();

}


 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 12, 2013 Jun 12, 2013

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)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2013 Jun 12, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 12, 2013 Jun 12, 2013

Thanks, i couldn't believe it without to see the file... but it works - great!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2013 Jun 12, 2013
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines