Creating a dynamic list

I am attempting to create a dynamic list, probably from XML, but I’m open to other suggestions.

The goal is to have a little grid of 10 items (5 wide, 2 high), each of which is a thumbnail image with some text below it. When the thumbnail is rolled over I’d like for it to grow a little, then shrink back when rolled out.

Additionally, they will each need to carry an action and a variable. The action will be the same for each one, “gotoAndStop (“main”);” but the variable will have to be unique to each list item.

The most trouble I’ve had with this comes from arranging the items in the grid. It seems they always want to be right next to each other, and I can’t seem to get them to arrange the way I want them to (with a little bit of comfortable spacing on either side).

Bonus points if the grid can be smart enough to know on its own whether it needs to go to an additional page of content or not (meaning if there are more than 10 items to display).