Shekhar,
Want to add that sometimes, Captivate is not quick enough to execute immediately the action On Enter for the first slide (depends on several causes). If that is the case, insert a short first slide before the real first slide, and keep toggling the variable cpCmndCC by a simple action for the second slide (= the original first slide).
On Exit actions have to be used with care because they will not be done if the play head doesn't get to the last frame of the slide, as is th case when the slide has an interactive object that jumps to another slide. That is the reason I will not easily recommend On Exit actions.
http://blog.lilybiri.com/events-and-advanced-actions
Lilybiri