Chapter 17. Making Faces: The Living Emoticon

Application type: Collaborative

UI components used: AVPresence, Chat, PeopleList, ConnectionLight

Flash objects: SharedObject, NetConnection

SSAS objects: Application

Key points: Dynamically move objects around the screen

When the AOL, YAHOO!, and the MSN messengers started supporting emoticons, they captured something amazing. Emoticons (emotional icons) started as text sequences in e-mail messages that simulated facial expressions::-) for a smile, ;-) for a wink, or :-b for sticking out your tongue. Instant messengers took the idea one step further by replacing the text sequences with simple graphics. Now you can add even more personality to emoticons.

Figure 17.1 is a sneak peak at what you will build in this tutorial. It will use the concept of emoticons to illustrate how you can build collaborative applications. The SharedObject will take center stage in this tutorial, and you will learn some efficient coding techniques that were introduced with Macromedia Flash MX. It's a fun project that you can use as a foundation for constructing some incredible collaborative applications.

Figure 17.1. The finished Living Emoticon application running with four users and a video feed.



This tutorial uses a series of images that can be downloaded at

The Living Emoticon is a great application that will make your child or spouse drop Mr. Potato Head for at least five minutes and be entertained. You will phone your friends and tell them to get online to try this thing. The Internet providers of the world will seize as the world falls in love with the Living Emoticon. This tutorial alone will be worth the price you paid for this book! Ok, maybe that was going a bit too far, but trust me, you will love it.

The Living Emoticon lets you move the position of multiple MovieClips on a shared Flash stage. For this example, I chose to use face parts because Flash Communication Server is really about the human experience. Users connected will all use the same interface (no controller or lobby is used). Users will collaborate making faces while engaged in a live chat.

Technically, it is a very useful application with some great ActionScript. You can use this application as a foundation for building collaborative diagrams, floor plans, or games. The tutorial uses many Flash UI components with a simple implementation of the SharedObject. Yes, simple. This application also employs some unique scripting techniques that allows you to easily connect as many MovieClips as you need.

The key to the whole application is monitoring everyone's mouse position when an object is in Drag (mode)?get your mind out of the gutter, Drag is a perfectly normal function of Flash.

    Part I: 10 Quick Steps for Getting Started