Value of number field in JS

Jan 23, 2011 at 9:36pm

Value of number field in JS


is there a simple solution for reading the value of a number field in JavaScript?

I am trying this for a while now and cound get it work. Nearest thing here in the forum is this:
But i did not understand the solution.

Would be kind of importand, as i need to get this running until tomorrow.

Thanks for any hint.


Jan 23, 2011 at 11:34pm

I imagine by number field you mean something like the [number] or [flonum] objects. This is achievable with javascript by using the getvalueof() method. If you name your [number] object “zulu” you could use something like the line of code below:

Jan 24, 2011 at 8:41am

Oh, I just missed naming the object. Thanks!!

And, yes, I ment the [number] object. As you may imagine, I am quite new to Max/MSP.



You must be logged in to reply to this topic.