return value

Nov 13, 2010 at 4:12pm

return value

Hi Guys,

I’m trying to send a value to a live object. I get a message that object doesn’t understand the message. But if i send the same thing from a ‘normal’ messagebox it works just fine. So after some tests it seems the js object is returning the text wrapped in quotes and the object doesn’t like that. Anyone know if this is correct and if there’s a work around?


Nov 13, 2010 at 4:31pm

scratch that

Nov 14, 2010 at 10:20am

If I understand your question correctly, a fromsymbol connected to your js output may help your other object to understand the message.


Nov 14, 2010 at 9:43pm

To do it in your javascript you need to send out the message as an array of inividual strings:


Nov 24, 2010 at 4:21pm

thanx guys! that solves my question!!

Oct 1, 2011 at 2:54pm

I came upon the same problem. I want to send a message to a line object like “0, 5 100″, but there appears to be no way to put the comma in there. There is a work-around (replace the comma with a 0 so that it goes immediately to the first break-point), but I feel as though there ought to be a way to actually send the message “0, 5 100″ to a line~ object. I thought I could beat the system by making an Array where the second element was a string “, “, but THAT string gets wrapped with quotes as well, producing nonsense: ’0 “, ” 5 100′!

If I wanted to tell a message box to change what it displays with a set message, how could I do it? How could I set a message box to say “hello world”? Of course, I could say outlet(0, "set", "hello", "world"), but suppose that the message I wanted to display would be determined by the code, having a variable number of words? This can’t be impossible, can it?

Oct 2, 2011 at 7:53pm

To replicate the action of sending “0, 5 100″ in javascript you would do something like this:

outlet(0, 0);
outlet(0, 5, 100);

On the second point you can always create an array to contain the symbol arguments and then add/remove/whatever them and refer to the array:

var someWords = ["hello","world"];
outlet(0, someWords);

You must be logged in to reply to this topic.