ROTATING CUBE

I am trying to create a cube in color, centered, and aligned. I want to be able to click the left mouse for color, and the right mouse for orientation. I cannot seem to get this to work. Any suggestions?

Thanks
frustrated

Posting your code might help, nobody is going to do it for you.