An if statement typically needs to evaluate a 'true' or 'false' operation.
By using:
if(txtValue.text = "0") { ... }
You are actually assigning the value "0" to the 'text' property of your textfield - In other words you are NOT checking if it is EQUALS-TO "0".
You have to use the double-equals operator to return the desired outcome:
if(txtValue.text == "0") { ... }
This will then pass through your statement correctly.
Only some rare cases, you will wish to do an assignment (instead of 'checking' a condition) within the if-statement. This can often be found in file-reading or reference-checking statements like the following:
var someVar:Array;
if(someVar = methodThatCanReturnList()) { ... }
But this method is a bit frown upon. And for beginners it is much more recommended to master the "==" operator first.