MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference page 184

Actionscript language reference
Table of Contents

Advertisement

/* When the level of activity changes goes above or below the number defined in
Camera.motionLevel, trigger the onActivity event handler. If the
activityLevel is above the value defined in the motionLevel property
isActive will be set to true. Otherwise, the activityLevel has fallen below
the value defined in the motionLevel property (and stayed below that level
for 2 seconds), so set the isActive parameter to false. */
my_cam.onActivity = function(isActive:Boolean) {
/* If isActive equals true, set the themeColor variable to "haloGreen".
Otherwise set the themeColor to "haloOrange". */
var themeColor:String = (isActive) ? "haloGreen" : "haloOrange";
motion_pb.setStyle("themeColor", themeColor);
};
function changeMotionLevel() {
/* Set the motionLevel property for my_cam Camera instance to the value of
the NumericStepper component instance. Maintain the current motionTimeOut
value of the my_cam Camera instance. */
my_cam.setMotionLevel(motionLevel_nstep.value, my_cam.motionTimeOut);
}
motionLevel_nstep.addEventListener("change", changeMotionLevel);
See also
Camera.activityLevel, Camera.onActivity, Camera.onStatus,
184
Chapter 2: ActionScript Language Reference
Camera.setMotionLevel()

Advertisement

Table of Contents
loading
Need help?

Need help?

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

This manual is also suitable for:

Flash mx

Table of Contents