Packageorg.iotashan.nabaztagAPI
Classpublic class NabaztagEarsCommand
InheritanceNabaztagEarsCommand Inheritance NabaztagChoreographyCommand

A choreography command for moving the ears.



Public Properties
 PropertyDefined by
  angle : Number
Angle to move the ear to.
NabaztagEarsCommand
 Inheritedcommand : String
String that determines what type of command this is.
NabaztagChoreographyCommand
  rotation : Number
Direction to move the ear in to get to the angle.
NabaztagEarsCommand
 InheritedstartTime : Number
Starting time of this command, in "beats" specified by the tempo.
NabaztagChoreographyCommand
  targetEar : Number
Target ear for this command.
NabaztagEarsCommand
Public Methods
 MethodDefined by
  
NabaztagEarsCommand(startTime:Number, targetEar:Number = 0, angle:Number = 0, rotation:Number = 0)
Constructor Method.
NabaztagEarsCommand
  
getCommand():String
Returns this command in the proper URL format for use with the Nabaztag API.
NabaztagEarsCommand
Public Constants
 ConstantDefined by
  EARS_COMMAND : String = "motor"
The string value to be used for the command
NabaztagEarsCommand
  LEFT_EAR : Number = 1
NabaztagEarsCommand
  RIGHT_EAR : Number = 0
NabaztagEarsCommand
  ROTATE_BACKWARD : Number = 1
NabaztagEarsCommand
  ROTATE_FORWARD : Number = 0
NabaztagEarsCommand
Property detail
angleproperty
angle:Number  [read-write]

Angle to move the ear to. An angle of 0 is straight up, an angle of 180 would be "flat" down.

Implementation
    public function get angle():Number
    public function set angle(value:Number):void
rotationproperty 
rotation:Number  [read-write]

Direction to move the ear in to get to the angle.

Implementation
    public function get rotation():Number
    public function set rotation(value:Number):void
targetEarproperty 
targetEar:Number  [read-write]

Target ear for this command.

Implementation
    public function get targetEar():Number
    public function set targetEar(value:Number):void
Constructor detail
NabaztagEarsCommand()constructor
public function NabaztagEarsCommand(startTime:Number, targetEar:Number = 0, angle:Number = 0, rotation:Number = 0)

Constructor Method.

Parameters
startTime:Number
 
targetEar:Number (default = 0)
 
angle:Number (default = 0)
 
rotation:Number (default = 0)
Method detail
getCommand()method
public override function getCommand():String

Returns this command in the proper URL format for use with the Nabaztag API.

Returns
String
Constant detail
EARS_COMMANDconstant
public const EARS_COMMAND:String = "motor"

The string value to be used for the command

LEFT_EARconstant 
public const LEFT_EAR:Number = 1
RIGHT_EARconstant 
public const RIGHT_EAR:Number = 0
ROTATE_BACKWARDconstant 
public const ROTATE_BACKWARD:Number = 1
ROTATE_FORWARDconstant 
public const ROTATE_FORWARD:Number = 0