Ok, I think I gotcha now.

Could you attach more of your code to give us a better view of how you're trying to do it?