[MX] CharAt Probs.. Fast Help Please!

Well I have an example here for you and I want to know why it doesnt work?? And how can i make it work??[AS]
//Initial Number
myNumber = 512
//Add 10 to the number
myNumber += 10

//Trace the Number
trace(myNumber)
//Trace the character at 1 in the number
trace(myNumber.charAt(1))
[/AS]
The Output looks like this:

522
undefined

Thanks in advance…

-Scotty…

try

myString = myNumber.toString();
trace(myString.charAt(1))

yep
you should convert number into string in the 1st place cuz charAT is for strings only :thumb: