0

How can i preserve a variables value , so that i can re-use that when i run my application again ? What i've tried to do is:

package content.util

{ public class StaticTest { public static var testStatic:int; } }

and in my application i'm doing something like this:

StaticTest.testStatic = 5;

but when i'm reloading the app my static variable always set to 0. Shouldn't it be preserving the value "5" ?? please Help .

1 Answer 1

2

No, because you do not save it. If you close your application all data is gone.

Try putting it to a SharedObject.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.