This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
68
|
Chapter 2: Communication Components
for low, medium, and high bit rate Internet connections. (The settings used
depend on the value of the Default Settings parameter or the
defaultSetting
property.) Each setting uses an object with the following properties to adjust the
Camera object’s output:
width (in pixels), height (in pixels), fps, bandwidth (in
Kbps), and
key (for keyframe interval). The object also has a rate property that
controls the sampling rate of the Microphone object. You can override these set-
tings in client-side ActionScript by writing a new value to the
setLow, setMed, and
setHigh properties of the VideoRecord component.
The SetBandwidth component does not apply any changes to the VideoRecord com-
ponent. You can, however, use a ComboBox instance to let the user choose which
quality setting should be applied to a VideoRecord instance.
Component process overview
When the connect( ) method of a VideoRecord instance is invoked and passed a ref-
erence to a NetConnection object, the component creates two streams: an outgoing
stream (
out_ns) for the recording stream and an incoming stream (in_ns) for the
replay stream. Unlike the VideoPlayback component, the VideoRecord component
does not utilize FCPlayStreamClass to create a custom NetStream class. Rather, the
component uses the existing methods of the NetStream class. The component also
invokes a cameraOn( ) method upon connection, which grabs the output from the
Camera and Microphone objects. The cameraOn( ) method invokes the adjustSet-
tings( ) method to control the quality of output captured by the Camera and Micro-
phone objects. You can invoke VideoRecord.adjustSettings( ) from your own custom
UI elements, such as a combo box, to change the quality of recorded output on the
fly.
Whiteboard
The Whiteboard component is, as the name implies, a component that shows the UI
of a whiteboard with drawing and text tools, as shown in Figure 2-18. The menu has
the following options (from top to bottom):
Move/Transform tool
Selects and moves objects on the whiteboard. You can delete an item by clicking
it with the Move/Transform tool and pressing the Delete key. You can use this
tool to resize arrow lines, but you cannot resize text or text boxes with this tool.
Text tool
Creates standard text, in a _serif device font.
Text Box tool
Draws a black-outlined box, using the selected color in the color menu as its fill.
The text in this box uses the _sans device font.
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Summary of Communication Components
|
69
End Arrow Line tool
Draws a line with an arrow point at the end of the line (as determined by the
location of the second click).
Start Arrow Line tool
Works the same as the End Arrow Line tool, except that the arrow point is
placed at the first click point and not the second.
Dual Arrow Line tool
Creates a line with arrow points at both ends.
Color menu
Features eight colors that you can use as fill colors for the Text or Text Box tool
or as line colors for the line tools.
Expand/Collapse button
Expands and collapses the UI of the tools palette.
If you’re looking for a full-featured whiteboard component, check out
Fig Leaf Software’s WYSIdraw at http://products.figleaf.com. This
whiteboard features more drawing tools and can layer JPEG images
with other artwork in a collaborative environment. This component is
priced for enterprise use, starting at $995.
Nested Flash UI components
The Whiteboard component does not use any nested Flash UI components. You can
adjust the look-and-feel of the component by adjusting its skin symbols in the Com-
munication Components
Core Assets - Developer Only Whiteboard Assets
folder of the document’s Library.
Figure 2-18. The UI menu of the Whiteboard component

Get Programming Flash Communication Server 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.