Ambient Orb developer channel controller class
Usage: var orb:AmbientOrb = new AmbientOrb("AAA-BBB-CCC"); orb.config ( getColorByProp("name","red"), getAnimByProp("name","heartbeat"), "Orb Test" );
public devId:Stringpublic spectrum:Array [Read Only]public anim:Array [Read Only]public code:Array [Read Only]public function getColorByProp(prop:String, key:String):Objectlocate a color object by one of its properties
prop | (String) - acceptable props: "id", "hex", "name" |
key | (String) - value to match by, e.g: "0xFF00FF" |
Object - the matched _SPECTRUM object
| Error | on failed match |
public function getAnimByProp(prop:String, key:String):Objectlocate an animation by one of its properties
prop | (String) - acceptable props: "id", "name" |
key | (String) - value to match by, e.g: "slow" |
Object - the matched _ANIM object
| Error | on failed match |
public function getCodeByProp(prop:String, key:String):Objectlocate a server code by one of its properties
prop | (String) - acceptable props: "id", "desc" |
key | (String) - value to match by, e.g: "Unspecific error" |
Object - the matched _CODE object
| Error | on failed match |
public function config(colorId:String, animId:String, comment:String):Voidsend new configuration to the ambient orb device id
colorId | (String) |
animId | (String) |
comment | (String) |
Void
| Error | if instance device id, colorId,animId params have not been set
Usage: orb.config ( getColorByProp("name","red"), getAnimByProp("name","heartbeat"), "Orb Test" ); |