({{, (RefLink[ControlActive, paclet:ref/ControlActive])[act,norm] 
evaluates to act if a control that affects act is actively being used, and to norm otherwise.}})

OpenersNotesSection(Spacer1)Details

(RefLink[ControlActive, paclet:ref/ControlActive]) can be used to switch between a faster computation to be done while controls like sliders are being moved, and a slower computation to be done once the controls are released.

(RefLink[ControlActive, paclet:ref/ControlActive])[act,norm] can also be used to trigger evaluation of norm when controls are released.

(RefLink[ControlActive, paclet:ref/ControlActive])[] is equivalent to (RefLink[ControlActive, paclet:ref/ControlActive])[(RefLink[True, paclet:ref/True]),(RefLink[False, paclet:ref/False])].

(RefLink[ControlActive, paclet:ref/ControlActive])[act,norm] is effectively equivalent to (RefLink[If, paclet:ref/If])[(RefLink[$ControlActiveSetting, paclet:ref/$ControlActiveSetting]),act,norm].

OpenersPrimaryExamplesSection(Spacer1)Examples  (7)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Change the display while controls are being used:

Manipulate[ControlActive[u,u Range[4]],{u,0,1}]

OpenersExampleSection1(Spacer1)Scope  (2)

The arguments of (RefLink[ControlActive, paclet:ref/ControlActive]) can be any expression:

Manipulate[ControlActive[u,Graphics[Circle[{0,0},u],PlotRange->2]],{u,0,1.5}]

Use (RefLink[ControlActive, paclet:ref/ControlActive]) to switch between a low-resolution and a high-resolution version:

Manipulate[ArrayPlot[CellularAutomaton[n,{{1},0},{ControlActive[10,100],All}]],{n,1,64,1}]

OpenersExampleSection2(Spacer1)Applications  (2)

Only emit a sound when the manipulator is not actively used:

Manipulate[ControlActive[w,EmitSound[Play[Sin[1000 w t],{t,0,.2}]];w],{w,1,3}]

Use a lower sampling when actively manipulating:

Manipulate[Plot[Sin[1/(x-a)],{x,0,1},PlotPoints->ControlActive[5,50],PlotRange->1],{a,0,1}]

OpenersExampleSection3(Spacer1)Properties & Relations  (2)

By using the second argument of (RefLink[Dynamic, paclet:ref/Dynamic]), you can get an effect similar to (RefLink[ControlActive, paclet:ref/ControlActive]):

Manipulate[ControlActive[u,u Range[4]],{u,0,1}]

{Slider[Dynamic[u,{(u=p=#)&,(u#;p=# Range[4])&}]],Dynamic[p]}

Plot functions effectively use (RefLink[ControlActive, paclet:ref/ControlActive]) for the (RefLink[PerformanceGoal, paclet:ref/PerformanceGoal]) setting:

Manipulate[Plot3D[Sin[a x]Sin[b y],{x,0,3},{y,0,3},PerformanceGoal->ControlActive["Speed","Quality"],PlotRange->1],{a,1,3},{b,1,3}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[EventHandler, paclet:ref/EventHandler])  ▪  (RefLink[CurrentValue, paclet:ref/CurrentValue])  ▪  (RefLink[Mouseover, paclet:ref/Mouseover])  ▪  (RefLink[$ControlActiveSetting, paclet:ref/$ControlActiveSetting])  ▪  (RefLink[$DynamicEvaluation, paclet:ref/$DynamicEvaluation])  ▪  (RefLink[$SynchronousEvaluation, paclet:ref/$SynchronousEvaluation])  ▪  (RefLink[PerformanceGoal, paclet:ref/PerformanceGoal])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Introduction to Dynamic, paclet:tutorial/IntroductionToDynamic])}, {▪(RefLinkPlain[Advanced Dynamic Functionality, paclet:tutorial/AdvancedDynamicFunctionality])}, {▪(RefLinkPlain[Generalized Input, paclet:tutorial/GeneralizedInput])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Dynamic Visualization, paclet:guide/DynamicVisualization])}, {▪(RefLinkPlain[Gamepad & Device Interface, paclet:guide/GamepadAndDeviceInterface])}, {▪(RefLinkPlain[Options & Styling for Interactive Manipulation, paclet:guide/OptionsAndStylingForInteractiveManipulation])}, {▪(RefLinkPlain[Control Objects, paclet:guide/ControlObjects])}, {▪(RefLinkPlain[Interactive Manipulation, paclet:guide/InteractiveManipulation])}, {▪(RefLinkPlain[Dynamic Interactivity Language, paclet:guide/DynamicInteractivityLanguage])}, {▪(RefLinkPlain[Low-Level Interface Control, paclet:guide/LowLevelInterfaceControl])}})}})