Photo Gallery not working

I am trying to use the simple photo gallery written by sbeener. I’m using flash MX2004, and I’ve tried the tutorial and then just pasting over old code with my new photos to no avail.
What am I doing to get “output: Nan” or “output: 0” everytime I try to publish it.
All my photos are uniform in size compared to the photo movie clip. I am definitely the neophyte here, please help out with what may be a stupid question.