We use this form of words to show we are talking about a future action that is connected to another future action.
This is the ...ing form which we use to show that there is a period of time involved.
I will have been painting the room for four hours when he rings. (Both actions are in the future (Painting and the phone call) they are connected and the painting is before the call. The painting will take four hours and so we use the ...ing form.
I will have been talking to him for an hour before he goes. (The talk and going are in the future and the talk happens before the money. We use ..ing because the talk will last some time.