I think it may be giving the correct output. You I think are giving the wrong input. What documentation led you to pass those parameters? I don't think they are applicable.
If you copied this code from an old post in the Adobe forums, please read the entire (very long) post, to see that this was just a failed attempt as part of a much larger failed project.