matt i see you have a lot of post
some qustions are very simple and some harder but you don`t try to make the code you only ask for the code
so first try to make the code by your own, if something is wrong post than your code (so far you got) and then here we can help you
Seconded, when posting a question try to imagine no one knows anything about what you are doing, so give a bit of a background about what you are doing, the aim, the problem and where you think it might be or what you are looking for.
:)