Reputation: 77
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 .
Upvotes: 0
Views: 149
Reputation: 707
No, because you do not save it. If you close your application all data is gone.
Try putting it to a SharedObject.
Upvotes: 2