Packagecom.kraftner.communication
Classpublic class ControllerConnection

Handles the LocalConnections to request new controls and handles and dispatches changes from the Controller Application.



Public Methods
 MethodDefined by
  
ControllerConnection(pvt:PrivateClass)
Singleton constructor
ControllerConnection
  
addButton(label:String, handlerFunction:Function):void
Asks the controller to create a Button
ControllerConnection
  
addChoice(label:String = "", handlerFunction:Function, numChoices:uint = 2, value:uint = 0):void
Asks the controller to create a Rotary Selector to switch between choices.
ControllerConnection
  
addRange(label:String = "", handlerFunction:Function, minimum:Number = 0, maximum:Number = 100, value:Number):void
Asks the controller to create a Knob to control a range.
ControllerConnection
  
[static] Singleton constructor method
ControllerConnection
  
init():void
Asks the controller to reset the Controller Application
ControllerConnection
  
update(reference:uint, p:Number):void
Takes requests to change values and dispatches the corresponding Functions.
ControllerConnection
Constructor detail
ControllerConnection()constructor
public function ControllerConnection(pvt:PrivateClass)

Singleton constructor

Parameters
pvt:PrivateClass
Method detail
addButton()method
public function addButton(label:String, handlerFunction:Function):void

Asks the controller to create a Button

Parameters
label:String — Button-Label
 
handlerFunction:Function — Function that handles clicks on the button.
addChoice()method 
public function addChoice(label:String = "", handlerFunction:Function, numChoices:uint = 2, value:uint = 0):void

Asks the controller to create a Rotary Selector to switch between choices.

Parameters
label:String (default = "") — Rotary Selector Label
 
handlerFunction:Function — Function that handles changes of the Rotary Selector. The function needs to accept a uint as argument: function foo(i:uint):void
 
numChoices:uint (default = 2) — Number of choices.
 
value:uint (default = 0) — Value the Rotary Selector will be set to when created.
addRange()method 
public function addRange(label:String = "", handlerFunction:Function, minimum:Number = 0, maximum:Number = 100, value:Number):void

Asks the controller to create a Knob to control a range.

Parameters
label:String (default = "") — Knob-Label
 
handlerFunction:Function — Function that handles changes of the knob. The function needs to accept a Number as argument: function foo(i:Number):void
 
minimum:Number (default = 0) — Minimum value of the range
 
maximum:Number (default = 100) — Maximum value of the range
 
value:Number — Value the Knob will be set to when created. Default value is the minimum value.
getInstance()method 
public static function getInstance():ControllerConnection

Singleton constructor method

Returns
ControllerConnection
init()method 
public function init():void

Asks the controller to reset the Controller Application

update()method 
public function update(reference:uint, p:Number):void

Takes requests to change values and dispatches the corresponding Functions.

Parameters
reference:uint — uint under which the callback Function is stored
 
p:Number — value to which to set the corresponding property