Button Question

So I need to know how to keep a button off or on after pushing it. I mean, push it and save that state, then push it again to put it to the other state. I can't really describe it in better words so I havent really been able to google it successfully.

I also need to know how to act on a button that has been pushed and held down for about 2 seconds differently then one that is pushed just once momentarily.

Thanks!

The state change detection tutorial will help with the first question.

Have you gone through the basic examples that came with the IDE.