B.B.
I think you're right - it isn't really for attention...I think it's just she doesn't want to take the time to "do the deed". We tried all the things you tried - taking stuff away, stern talks, etc. And I agree - even if you guys were the "spanking type", don't think that that would be the way to go.
I'll tell you what we did with our now nearly 5 year old....any time she wanted to do something - play on my computer, wanted a snack, whatever - "Go potty first." Didn't matter what the request was, what we were getting ready to do or where we were going..."Go potty first." Even if she was getting ready to start a new activity..."Go potty first." It worked like a charm.
Good luck!