Graphics

 View Only
  • 1.  Use a variable in a RossTalk command, coming from DashBoard

    Posted 05-03-2016 19:22
    Trying to use a variable (layerNum) to send XPression graphics to screen with a RossTalk command in DashBoard, when a button in a custom panel is clicked. I need these graphics to go to the top-most layer of the framebuffer. Code looks like this:


    var [layerNum] = [20];
    function callbackFunction(success, cmd, result, exception)
    {
    ogscript.debug ('Test message - LayerNum is: ' + layerNum);
    }
    rosstalk.sendMessage('155.241.240.198', 7788, 'TAKE 4001:Framebuffer 1:layerNum', callbackFunction);


    I can get the value of layerNum (20) to show correctly in my debug statement, but it is not working in my RossTalk command. My graphic goes to Layer 1 (as it is defined in XPression Sequencer). I'm assuming I have my syntax wrong, and that value is just being ignored.

    Any ideas on correct syntax/method to do this? Brian Ford?


  • 2.  RE: Use a variable in a RossTalk command, coming from DashBoard

    Posted 05-04-2016 00:48
    Sorry, I'm not a dashboard expert, but it looks like the syntax should be like this instead:
    rosstalk.sendMessage('155.241.240.198', 7788, 'TAKE 4001:1:' + layerNum, callbackFunction);

    The layerNum variable should be outside of the quotes, so it doesnt just send the word "layerNum" but rather it gets evaluated and sent as it's actual number.
    Also you don't want the word "framebuffer" in the rosstalk command, you just need to send the framebuffer number. (I think they start at 0, so sending 1 might actually be the second channel/framebuffer).
    #XPression


  • 3.  RE: Use a variable in a RossTalk command, coming from DashBoard

    Posted 05-04-2016 19:16
    Thanks, Brian! Did the trick!
    #XPression