Function to create AVMessenger object