Hi everybody,

pls help me i can't understand y parseInt is not working
I'm having 1 array which contains the value from a user input, only numbers. when i supposed to sum all the values using parseInt i won't get result the result is only Nan. pls anybody have the solution for it.

here is the code :
(Note I'm Using Mx 2004 Professional)

[I] input = "25,15,10,30,20";
myArray = input.split(",");

for (i =0; i<myArray.length;i++){
val = (parseInt(myArray));
sum += val;
}
trace(sum)


the output only comes as Nan . pls help me

Thanks in advance.