MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Specifikace Strana 204

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 369
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 203
Client-Side Communication ActionScript 13
Example
The following example sets the fps rate of the active camera, myCam.fps, to the value provided by
the users text box,
this.config.txt_fps.
if (this.config.txt_fps != undefined) {
myCam.setMode(myCam.width, myCam.height, this.config.txt_fps, false);
}
Note: The setMode function does not guarantee the requested fps setting; it sets the fps you requested or the
fastest fps available.
See also
Camera.currentFps, Camera.setMode
Camera.get
Availability
Flash Player 6.
Flash Communication Server MX (not required).
Usage
Camera.get([index])
Note: The correct syntax is Camera.get(). To assign the Camera object to a variable, use syntax like
activeCamera = Camera.get().
Parameters
index An optional zero-based integer that specifies which camera to get, as determined from
the array returned by
Camera.names. To get the default camera (which is recommended for most
applications), omit this parameter.
Returns
If index is not specified, this method returns a reference to the default camera or, if it is in use
by another application, to the first available camera. (If there is more than one camera
installed, the user may specify the default camera in the Flash Player Camera Settings panel.) If
no cameras are available or installed, the method returns
null.
If index is specified, this method returns a reference to the requested camera, or null if it is
not available.
Description
Method; returns a reference to a Camera object for capturing video. To actually begin capturing
the video, you must attach the Camera object either to a Video object (see
Video.attachVideo)
or to a NetStream object (see
NetStream.attachVideo). (The NetStream object is available only
with Flash Communication Server.)
Unlike objects that you create using the
new constructor, multiple calls to Camera.get reference
the same camera. Thus, if your script contains the lines
cam1 = Camera.get() and
cam2 = Camera.get(), both cam1 and cam2 reference the same (default) camera.
In general, you shouldnt pass a value for
index; simply use Camera.get() to return a reference
to the default camera. By means of the Camera settings panel (discussed later in this section), the
user can specify the default camera Flash should use. If you pass a value for
index, you might be
trying to reference a camera other than the one the user prefers. You might use
index in rare
cases—for example, if your application is capturing video from two cameras at the same time.
Zobrazit stránku 203
1 2 ... 199 200 201 202 203 204 205 206 207 208 209 ... 368 369

Komentáře k této Příručce

Žádné komentáře