502
Chapter 7: ActionScript for Flash
motion_pb.label = "Motion is above "+my_cam.motionLevel;
} else {
motion_pb.setStyle("themeColor", "haloOrange");
motion_pb.label = "Motion is below "+my_cam.motionLevel;
}
};
function changeMotionTimeOut() {
my_cam.setMotionLevel(my_cam.motionLevel, motionTimeOut_nstep.value*1000);
}
motionTimeOut_nstep.addEventListener("change", changeMotionTimeOut);
motionTimeOut_nstep.value = my_cam.motionTimeOut/1000;
See also
Camera.onActivity
,
Camera.setMotionLevel()
Camera.muted
Availability
Flash Player 6.
Usage
active_cam
.muted
:Boolean
Description
Read-only property; a Boolean value that specifies whether the user has denied access to the
camera (
true
) or allowed access (
false
) in the Flash Player Privacy Settings panel. When this
value changes,
Camera.onStatus
is invoked. For more information, see
Camera.get()
.
Example
In the following example, an error message could be displayed if
my_cam.muted
evaluates to true.
var my_cam:Camera = Camera.get();
var my_video:Video;
my_video.attachVideo(my_cam);
my_cam.onStatus = function(infoObj:Object) {
if (my_cam.muted) {
/* If user is denied access to their Camera, you can display an error
message here. You can display the user’s Camera/Privacy settings again using
System.showSettings(0); */
trace("User denied access to Camera");
System.showSettings(0);
}
};
See also
Camera.get()
,
Camera.onStatus
Summary of Contents for FLEX-FLEX ACTIONSCRIPT LANGUAGE
Page 1: ...Flex ActionScript Language Reference...
Page 8: ......
Page 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Page 76: ......
Page 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Page 135: ...case 135 See also break default strict equality switch...
Page 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Page 808: ...808 Chapter 7 ActionScript for Flash...
Page 810: ...810 Appendix A Deprecated Flash 4 operators...
Page 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Page 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Page 822: ...822 Index...