This is just a general answer, but hopefully it can help you a bit. In your question, you posted a whole bunch of code for us to deduce the problem. This is both a good thing and a bad thing. It is good because you have posted enough information for us to be able to help you and figure out what is going on.
However, it is also bad, not in the sense that you are doing something bad, but in the sense that it is highlighting where you are having your problem solving this issue. Again generalizing, problems with code are usually simple in nature. They become complex because of the complexity surrounding and obscuring them. In order to help you with this problem, and in order to help yourself (both in general and in this case), you should start by narrowing down the scope of where the problem occurs.
For instance, in your question, you say you have an issue recording a message. However then you say "I could record the message when button is clicked. " So you have introduced a new variable into your question without telling us about the button. So we aren't sure anymore if you are having an issue with the button, or with recording the message.
So what I am saying is, narrow down your problem, and nail it down. You should be able to make a solid statement like this: There is a button, that when clicked should record a message. However, when my application moves a slide from one to the next, the button no longer works. In order to do this, you will need to define exactly what behavior you are trying to make happen. Even if this isn't a formal project, you should make a use case (even in notepad is fine) where you exactly describe what functionality you are trying to make happen (implement). You will then be able to exactly describe how your code is not doing what you said you want it to do.