package
{
public class Main extends Sprite {
private var a=0;
private var b=0;
private var c=2;
public function Main(){
a=9;
b=4;
c=8;
}
}
}
Is there an easy way to reset all of my variables to the way they were when I first loaded the package so that I don’t have to go through all of the variables and reset them manually?
Thank you.
The short answer is no. However, one solution might be to assign your class variables to new variables that you declare within your function. That would preserve the initial values and makes them available to other functions. A true “reset” would only happen if the class were re-instantiated.