Forums > Javascript

Send message to [line] object using JS

December 13, 2013 | 10:04 am

I have issues sending a message to the line object caused by a comma in the message format. I belive this is an inconsistency in MAX. I successfully send messages to the [play] object but do not know how to send to line?

object: [play~]
message format: "start 0 5000 5000"
javascript: outlet(0,"start",0,5000,5000);

VS

object: [line]
mesage format: "3.5, 19.25 400"
javascript: ????


December 13, 2013 | 11:08 am

Those are two separate messages.

First, the 3.5 is sent, setting the current output of line, then a list is sent, telling it to go to 19.25 in 400 ms.

So, first do: outlet(0,3.5), then do: outlet(0, 19.25, 400).

-Ben


December 16, 2013 | 2:12 am

Thanks for enlightening me:) I understand now – the message in the example was actually doing "two things".


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