Sorry if I've missed it but I can't seem to find in the documentation the syntax to change a button label. I'm doing the following:
{
"name": "bbms",
"type": "Button",
"value": 0,
"label": "BlackBox",
"x": .38,
"y": .65,
"width": .375,
"height": .075,
"mode": "momentary",
"color": "#00a0a0",
"stroke": "#00c0c0",
"isLocal":true,
"ontouchstart": "if(this.value == 0)
{this.setValue(1);this.setLabel('Mainstage');}
else{this.setValue(0);this.setLabel('BlackBox')};",
},
Without the "ontouchstart" line I get a button that flashes when I touch it. With the "ontouchstart" line the button doesn't respond to touch at all.
What I'm trying to achieve here is a button that toggles between two different text labels when you press it.
Once I've got that working I'm hoping to add the following code to it:
"rfu.address='/rfubb';rfu.columns=5;rfu.rows=5" for one case and
"rfu.address='/rfums';rfu.columns=7;rfu.rows=7" for the other case.
"rfu" is a MultiButton.
This is for a remote focus unit for lights. We have 24 dimmers in our Black Box and 45 dimmers in our Mainstage. I'd like to toggle between a 25 MultiButton and a 49 Multibutton depending on which theatre I'm in.
All the dimmers are on the same DMX controller and I have a Perl script on the lighting control computer translating OSC. I plan to have the Perl script use the OSC address /rfubb or /rfums to translate the MultiButton numbers to the correct DMX offset.