Overview
Introduction:
In our everyday work, it is very hard to meet with everyone in person because of our busy schedules. To resolve this problem, E-mails helped us a lot to communicate with our clients, friends, colleagues etc. Now millions of people are using emails and can’t live without them. It would be great for all webmasters to have an application that will let them send audio/video messages to their clients and friends. Further more, it will also enhance your reputation as a person/company who is using the current trends of technology &communication.
In this article, we are going to make an audio/video messaging application that will allow you to send audio/video email messages to anyone in the world. The problem is that many users use email clients that do not support multimedia contents other then simple images.
The main benefit of your application is that it will store all messages on your server and won’t send those messages as attachments. Instead a link to the message will be send to the receiver so that he can easily watch & listen to your message. In addition to this, neither sender, nor receiver has to download any plug-in or software to receive the message as the entire message will be broadcast using Macromedia Flash Player that is already installed on almost all the computers that are connected to internet. According to News.com’s survey report, Macromedia Flash Player is installed on 98% of computers that are connected to internet.
![](/Downloads/Tutorial_flashmessenger.zip/bc.gif)
![](/Downloads/Tutorial_flashmessenger.zip/gr.gif)
![](/Downloads/Tutorial_flashmessenger.zip/gr.gif)
Table of Contents:
- Introduction
- Required software
- Skill level
- Source Files
- Introduction to Macromedia Flash Communication Server MX
- General workflow of this application
- Setting up the application’s directory under flash communication server
- Creating the User interface of this application
- Writing the Actionscript to make the application working
- Testing the movie
- Conclusion
Introduction:
In our everyday work, it is very hard to meet with everyone in person because of our busy schedules. To resolve this problem, E-mails helped us a lot to communicate with our clients, friends, colleagues etc. Now millions of people are using emails and can’t live without them. It would be great for all webmasters to have an application that will let them send audio/video messages to their clients and friends. Further more, it will also enhance your reputation as a person/company who is using the current trends of technology &communication.
In this article, we are going to make an audio/video messaging application that will allow you to send audio/video email messages to anyone in the world. The problem is that many users use email clients that do not support multimedia contents other then simple images.
The main benefit of your application is that it will store all messages on your server and won’t send those messages as attachments. Instead a link to the message will be send to the receiver so that he can easily watch & listen to your message. In addition to this, neither sender, nor receiver has to download any plug-in or software to receive the message as the entire message will be broadcast using Macromedia Flash Player that is already installed on almost all the computers that are connected to internet. According to News.com’s survey report, Macromedia Flash Player is installed on 98% of computers that are connected to internet.
Required Software
For this application, we will use Macromedia Flash MX 2004 professional to create the front end of this application. You can download a trial version from: http://www.macromedia.com/downloads/
In addition to this, you need to have Macromedia Flash Communication Server installed on your computer. You can download a developer version or Trial enterprise version from the above link as well.
Skill Level:
This article is targeted to intermediate or advanced developers.
Introduction to Macromedia Flash Communication Server MX:
Macromedia Flash Communication Server MX is a powerful server platform that lets you create rich communication applications in Macromedia Flash. Flash Communication Server lets two or more people participate in a real-time conversation using text, audio, and/or video. For example, you can use Flash Communication Server for meetings, online communities, customer support, sales support, training, remote presence, or instant messaging. Flash Communication Server is a platform for streaming live data across networks for delivery to the Internet, PDAs, interactive TV, and more, and it is part of Macromedia’s complete solution for database connectivity, directory systems, and presence services. Flash Communication Server can also be used for personal projects such as a home intercom, a pet camera, or video publishing.
Macromedia Flash Communication Server MX based application have a specific architecture of working. The Macromedia Flash Communication Server MX 1.5 platform is made up of two parts: The server, which provides the means of communication, and Macromedia Flash Player. Applications built on this platform consist of a client Macromedia Flash movie (SWF) that is run by Flash Player, and a server component that communicates with the client. The server component consists, minimally, of an application folder you’ve created on the server running Flash Communication Server. This folder can optionally contain Server-Side Communication ActionScript (ASC) files and other resource files used by the communication application.
The server and the Flash client movie communicate over a persistent connection using Real-Time Message Protocol (RTMP). In a typical scenario, the Flash client is delivered to the Flash Player by a web server over HTTP. The Flash client then establishes a persistent connection to Flash Communication Server using RTMP, allowing for an uninterrupted data stream to flow between client and server.
To request a file from a web server, the file must exist on the root or under certain directory on that server similarly, to connect to any application of Macromedia Flash Communication Server MX, their must be a folder exist whose name and the name of application must be same. For e.g., if you want to connect to an application of flash communication server named "myChat", then there must exist a folder named "myChat" under the application folder of Macromedia Flash Communication Server MX’s application folder path. By default, on windows operating system, the path of applications folder of Macromedia Flash Communication Server MX is:
C:\Program Files\Macromedia\Flash Communication Server MX\applications\
Where C: is your windows installation directory.
NOTE: For more info about Macromedia Flash Communications server, goto:
http://www.macromedia.com/software/flashcom/
General workflow of our Audio/Video messaging application:
We’ll start by setting up the base of our application. The application will allow us to send audio/video based email messages. The application will consist of two flash movies, one for recording the messages and sending them to receivers, and one will be used for watching the received messages.
The workflow of the first movie, which will be used for recording and sending the messages will be:
- Collect your information.
- Connect your flash movie to Flash Communication Server.
- Once connected, it will bring you to the recording area of our application.
- It will allow us to record our message, preview it, and re-record it if necessary.
- When you will ask the movie to send it, then it will connect to your application server & send the link to newly created message to the receiver. I am using ASP as the server side language.
- And finally, it will send link of this message to the receiver.
The workflow of the second movie that will be used for watching the messages will be:
- Receive message info from the link that opened this swf.
- Connect to Flash Communication Server
- Play the received message.
![](/Downloads/Tutorial_flashmessenger.zip/bc.gif)
![](/Downloads/Tutorial_flashmessenger.zip/gr.gif)
![](/Downloads/Tutorial_flashmessenger.zip/gr.gif)