Thanks guys, I used ahmed’s idea though, after some reading (i probably should have read the AS reference first), i found that what i really needed was the substring method, because some of my variable values were more that 4 digits, and the charAt only got the third character.