How to keep 0001 instead of 1

Am I retarded or is there no easy way to keep 001? I am trying to get actionscript to keep my variable as 001. Part of my solution is done as I created an if else statement to append my variable to 0 or 00 depending on how big the number is (has to be a better way…). The second part however requires that I can add 1 to this. Not working with the if else statement. I mean, what happens is that once it goes into the appending part then, it’s starts counting back? Can somebody help with this?

I have, Number = 0;

if (number<10) {
number = “00” + number;
}else if (number >10 && number <100){
number = “0” + number;
}else{
number = number;
};
Or something really similar. I am away from my pewter so I apologize. Please help. Thank you.