Over the past few weeks I have been working on some AS3 controls, the controls contain a list box whose sizes are defined in pixels instead of rowCount.

Occassionally, I would run into error such as “TypeError: Error #1010: A term is undefined and has no properties.” At the first glimpse, I thought it was my code’s problem, but after pulling my hair for numerous hours, I found that the problem came from the dimension of the list box, that is if the list box is set at certain dimension, the error would occur. Given the limited time I have, I have found the following height ranges would prevent error:

113 – 122px
135 – 142px
157 – 162px
179 – 189px

I have yet to get to the bottom of this bug, but for now, I think the above might offer a little clue and save a little cursing.