Creating the Calling Client

The calling client should include the following functionality:

  • The user should be asked to log in before connecting to the FlashCom application and being allowed to place a call.

  • When the client first connects, the user should be presented with a button that enables him to place a call.

  • If the administrator is not online or otherwise cannot accept the call, the Place Call button should change to a Record button to allow the user to record a message.

  • If the user’s call is accepted by the administrator, the client should display the video from both the calling client and the administrator client. Additionally, the client should play the audio from the administrator. The button should change to an End Call button, so the user can end the call.

Here are the steps to follow to create the calling client:

  1. Create a new Flash document named callingClient.fla and open it.

  2. Add the PushButton component symbol to the Library. You can do this by dragging an instance of the push button to the Stage and then deleting it.

  3. Add a new video symbol by choosing New Video from the Library panel’s pop-up Options menu.

  4. Create a new movie clip symbol named videoMc.

  5. Edit videoMc, and create an instance of the video symbol within it so that the video symbol instance is placed at (0,0).

  6. Name the video symbol instance vid.

  7. Open the linkage properties for videoMc.

  8. Select the Export for ActionScript and Export on First Frame options and set the linkage identifier to VideoMcSymbol.

  9. Add the following ...

Get Actionscript Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.