Behaved oneself when one stood in for (5)

I believe the answer is:
acted
'behaved' is the definition.
(acting is a kind of behaving)
I can't explain the remainder of the clue.
Can you help me to learn more?
(Other definitions for acted that I've seen before include "Behaved in a certain manner" , "Played a 30ac" , "took part in simulation" , "Took part in play" , "Performed (in a play)" .)
