Implementing padding for thumbs

Hi

i, am building an portfolio site and i have come a long way (still a beginner) but now i found an problem. After i load xml file for paths to portfolio assets i load actual jpg’s and/or swf’s. But i am stuck since i do not understand how to implement padding so thumbs will be spaced evenly… I understand that i should use something like

thumb.x += thumb.width + padding 

but than how to position first thumb? I will be really happy if someone can point me in the right direction.

tnx
Luka