Currentfps (Camera.currentfps Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Example
The following example changes the maximum amount of bandwidth used by the camera feed.
Create a new video instance by selecting New Video from the Library options menu. Add an
instance to the Stage and give it the instance name
component instance to the Stage and give it the instance name
the following ActionScript to Frame 1 of the Timeline:
var bandwidth_nstep:mx.controls.NumericStepper;
var my_video:Video;
var my_cam:Camera = Camera.get();
my_video.attachVideo(my_cam);
this.createTextField("bandwidth_txt", this.getNextHighestDepth(), 0, 0,
100, 22);
bandwidth_txt.autoSize = true;
this.onEnterFrame = function() {
bandwidth_txt.text = "Camera is currently using "+my_cam.bandwidth+"
bytes ("+Math.round(my_cam.bandwidth/1024)+" KB) bandwidth.";
};
//
bandwidth_nstep.minimum = 0;
bandwidth_nstep.maximum = 128;
bandwidth_nstep.stepSize = 16;
bandwidth_nstep.value = my_cam.bandwidth/1024;
function changeBandwidth(evt:Object) {
my_cam.setQuality(evt.target.value 1024, 0);
}
bandwidth_nstep.addEventListener("change", changeBandwidth);
The
MovieClip.getNextHighestDepth()
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
See also
setQuality (Camera.setQuality method)

currentFps (Camera.currentFps property)

public currentFps : Number [read-only]
The rate at which the camera is capturing data, in frames per second. This property cannot be
set; however, you can use the
--which specifies the maximum frame rate at which you would like the camera to
Camera.fps
capture data.
Availability: ActionScript 1.0; Flash Player 6
method used in this example requires Flash Player
MovieClip.getNextHighestDepth()
method to set a related property--
Camera.setMode()
. Add a NumericStepper
my_video
bandwidth_nstep
. Then add
method.
Camera
385

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF