Macromedia flash media server 2-client-side actionscript language reference for flash media server 2 ユーザーズマニュアル

ページ / 156
82
Client-Side ActionScript Language Reference
NetStream.attachVideo()
Availability
Flash Player 6.
Flash Communication Server MX 1.0.
Usage
public attachVideo(source : Camera [, snapShotMilliseconds : Number])
Parameters
source
  The source of the video transmission. Valid values are a Camera object (which starts 
capturing video) and 
null
. If you pass 
null
, Flash stops capturing video, and any additional 
parameters you send are ignored. 
snapShotMilliseconds
  An optional integer that specifies whether the video stream is 
continuous, a single frame, or a series of single frames used to create time-lapse photography. 
If this parameter is omitted, Flash captures all video until you issue 
my_ns.attachVideo(null)
If you pass 0, Flash captures only a single video frame. Use this value to transmit 
“snapshots” within a preexisting stream.
If you pass a positive number, Flash captures a single video frame and then appends a 
pause of length 
snapShotMilliseconds
 as a “trailer” on the snapshot. Use this value to 
create time-lapse photography effects.
Returns
Nothing.
Description
Method; starts capturing video from the specified source, or stops capturing if 
source
 is 
null
. This method is available only to the publisher of the specified stream.
NO
TE
Flash interprets invalid, negative, or nonnumeric arguments as 0.