Skip to main content
Participating Frequently
January 28, 2016
Answered

as3 SharedObject || how can i save my score?

  • January 28, 2016
  • 2 replies
  • 775 views

so.. this is my code

"so.flush();" -- It keeps my points right?

Unfortunately it does not work for me..

Can someone please fix my code?

This topic has been closed for replies.
Correct answer dmennenoh

You're setting score but not doing the flush(). You are only doing flush() in the else. This should work better:

if(so.data.score == null){

     so.data.score = level_mc.bheus_tzt_all.text; //already a string...

     so.flush();

}else{

     level_mc.bheus_tzt_all.text = so.data.score;

}

2 replies

dmennenohCorrect answer
Inspiring
January 28, 2016

You're setting score but not doing the flush(). You are only doing flush() in the else. This should work better:

if(so.data.score == null){

     so.data.score = level_mc.bheus_tzt_all.text; //already a string...

     so.flush();

}else{

     level_mc.bheus_tzt_all.text = so.data.score;

}

Participating Frequently
January 29, 2016
so.data.score_all = level_mc.bheus_tzt_all.text;
trace(so.data.score_all);

I did this and I worked in the (trace)

But I have to keep the score ...

how?

By the way your code does not really work for me.

Participating Frequently
January 29, 2016

i can to talk with you in private?

facebook?

of skyp  or something?

Participating Frequently
January 28, 2016

Anyone who can help me a email disappointing  navtchyev@gmail.com