Graphics

 View Only
  • 1.  Scripting help

    Posted 01-24-2017 16:26
    I am trying to write a script and I am having some trouble with. I am fairly sure its possible I am just unsure how to write it.

    So I need a script that is basically a 0 or 1

    if 0 then layer1.posY value would come from a widget

    if 1 then layer1.posY vale would come from a Datalink

    Any help and or thoughts would be great

    "‹Thanks


  • 2.  RE: Scripting help

    Posted 01-24-2017 21:24
    Try to use datalinq that is what you need !
    Go on Ross website and have a look at Xpression-U, a lots of video will teach you how to do...
    #XPression


  • 3.  RE: Scripting help

    Posted 01-25-2017 21:21

    Hi.
    1-st. Use value text object from data sourse widget or datalink.
    2-st Use Visual logic or Script.
    Visual logic - look on the picture
    **************
    Or Script:



    dim txt as xpBaseObject
    dim layer as xpBaseObject

    Self.GetObjectByName("Text1", txt)
    Self.GetObjectByName("Quad1", layer)

    if (txt.text = 0) then
    layer.PosY = 700 'POS 1 WHEN "0"
    else
    layer.PosY = 500 'POS 2 WHEN "1"
    End ifdim txt as xpBaseObject
    dim layer as xpBaseObject

    Self.GetObjectByName("Text1", txt)
    Self.GetObjectByName("Quad1", layer)

    if (txt.text = 0) then
    layer.PosY = 700 'POS 1 WHEN "0"
    else
    layer.PosY = 500 'POS 2 WHEN "1"
    End if

     


    #XPression