Forums > Javascript

Get [live.menu] selected value


March 9, 2014 | 11:13 am

I am able to obtain the selected index from the [live.menu] object but is it possible to get the value of the selected item?

livemenu  = this.patcher.getnamed("sn_livemenu");
post(livemenu.getvalueof());

March 15, 2015 | 4:22 pm

you could get the menu items which returns an array and then use the menu index to get the menu text.

var livemenu = this.patcher.getnamed("theMenu");

function msg_int(){
var a = livemenu.getattr(‘items’);
var b = livemenu.getvalueof();
post(a[b*2]);
}

Viewing 2 posts - 1 through 2 (of 2 total)

Forums > Javascript