MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Specifiche Pagina 258

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 369
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 257
Client-Side Communication ActionScript 67
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.
After attaching the video source, you must call
NetStream.publish to actually begin
transmitting. Subscribers who want to display the video must call the
NetStream.play and
Video.attachVideo methods to display the video on the Stage.
You can use
snapShotMilliseconds to send a single snapshot (by providing a value of 0) or a
series of snapshots—in effect, time-lapse footage—by providing a positive number that adds a
trailer of the specified number of milliseconds to the video feed. The trailer extends the length of
time the video message is displayed. By repeatedly calling
attachVideo with a positive value for
snapShotMilliseconds, the snapshot/trailer/snapshot/trailer... sequence creates time-lapse
footage. For example, you could capture one frame per day and append it to a video file. When a
subscriber plays back the file, each frame remains onscreen for the specified number of
milliseconds and then the next frame is displayed.
The snapShotMilliseconds parameter serves a different purpose from the fps parameter you
can set with Camera.setMode. When you specify the snapShotMilliseconds, you are
controlling how much time elapses during playback between recorded frames. When you specify
the
fps using Camera.setMode, you are controlling how much time elapses during recording and
playback between recorded frames.
For example, suppose you want to take a snapshot every five minutes for a total of 100 snapshots.
You can do this in two different ways:
You can issue a NetStream.attachVideo(source,500) command 100 times, once every five
minutes. This takes 500 minutes to record, but the resulting file will play back in 50 seconds
(100 frames with 500 milliseconds between frames).
You can issue a Camera.setMode command with an fps value of 1/300 (1 per 300 seconds, or
1 each 5 minutes), and then issue a
NetStream.attachVideo(source) command, letting the
camera capture continuously for 500 minutes. The resulting file will play back
in 500 minutes—the same length of time that it took to record—with each frame being
displayed for 5 minutes.
Both techniques capture the same 500 frames, and both approaches are useful; which approach to
use depends primarily on your playback requirements. For example, in the second case, you could
be recording audio the entire time. Also, both files would be approximately the same size.
Vedere la pagina 257
1 2 ... 253 254 255 256 257 258 259 260 261 262 263 ... 368 369

Commenti su questo manuale

Nessun commento