Dynamic AS gallery

Hi… i am working on a new image gallery and found this website

Can anyone help me on how to create a thumbnail gallery like the one on the website, that resizes number of thumbnails shown for different monitor sizes but does not changes their individual size?

Its really really important. I just need some AS code to start or an idea on how to do it…