Accessibility
 
Home / Developer Center / Flash Communication Server Developer Center /

Flash Communication Server Article

Using the Whiteboard component
Using the Whiteboard component is much like using any other Flash Communication Server component. Follow these steps to create an application using the Whiteboard component.

Here's what the application looks like:

 
Application built with the Whiteboard component
 

Creating an application folder
Locate your Flash Communication Server application folder and add a folder for your whiteboard application. If you installed Flash Communication Server with the default developer configuration, the application folder would be:

C:\Inetpub\wwwroot\flashcom\applications\

Create a folder called whiteboard inside the applications folder.

Writing the "one line" main.asc
Create a new server-side file called main.asc. Open the file in a text editor such as Notepad or Dreamweaver MX. Add this line:

load( "components.asc" );

Save the file in the whiteboard folder. If you're working in a production environment, upload this file to the server. If you make any edits to this file after running the whiteboard application, be sure to reload the application using the Communication Application inspector.

Adding the Whiteboard component
Open a new File in Macromedia Flash MX and select the Flash Communication Server components in the Components panel. Drag the Whiteboard component onto the Stage. Here's how it looks:

 
Whiteboard component
 

Give the component an instance name of whiteboard_mc. For the components to work properly, you have to place them all on the same frame in your timeline.

Note: If you don't have the Flash Communication Server components, you can easily download them. Follow the instructions for adding them to your FirstRun folder and then restart Macromedia Flash MX.

Adding the Connection Light and Simple Connect components
To show that you've successfully connected to the server, add the Connection Light component: Drag it onto the Stage from the Components panel and set the instance name to light_mc.

You also need Simple Connect to manage the connection with the server. Drag the Simple Connect component from the panel and drop it onto the Stage. Select the component, go to the Property inspector, and set the Application Directory to rtmp:/whiteboard ("rtmp:/" references the application path and "whiteboard" references the application instance). This is the same folder that you created earlier.

Next click the Components field and add two new values: whiteboard_mc and light_mc. By doing this, you establish a connection between the Simple Connect component and the server, and automatically initiate the Connection Light and Whiteboard components.

You can now publish your movie and start using the Whiteboard component with other users:

 
Sample whiteboard application
 

Extending the whiteboard application
You can go a step further by adding some other components, such as AudioConference, Chat, Cursor, and UserColor. Repeat the previous steps by dragging the components onto the Stage, giving them an instance name, and adding them to the list of components in the SimpleConnect properties. I've added some graphics and code to dress up the application. Examine this on your own by looking at the source file (whiteboard_BA5.fla) provided in the code download for this article.

Now that you've seen how to build an application by using only components, you can build one on your own.

 
 
 
Contents
Next