You don't need to type "code:", just surround the solution with the bracketed spoiler tags. I was just trying to show what to type without the tags becoming obscured. As for the SP button, it's the next to last one on the right of all the other buttons above the smileys when you're typing a new post.
[ spoiler]This text is hidden.[ /spoiler]
becomes
after you remove the spaces inside the brackets.