Setting a User Variable to the value of another User Variable

I have a menu presentation that uses an image with a touch event that sends a UDP message to another player to play a video and then the menu transitions to a NowPlaying image where I want to display the name of the video that is playing.  The name of each video needs to be the value of a user variable for that video.  So, there would be a user variable, v1,v2,v3, etc and each would have the value equal to the name or title of that video.  Then I want to use another user variable, say vidTitle as the source of the Live Text video name but I first need a way to set the value of vidTitle to value of v1,v2,v3, etc. How can this be done?  Or, is there another way to achieve this?




1 comment

  • 0

    To set a user variable to the value of another user variable, you can simply assign the value of one variable to the other. The exact syntax may vary depending on the programming or scripting language you are using. Here's an example in a few common languages:

    JavaScript: MyBalanceNow

    var variable1 = "Hello";
    var variable2 = variable1; // Assign the value of variable1 to variable2
    console.log(variable2); // Output: Hello


    variable1 = "Hello"
    variable2 = variable1  # Assign the value of variable1 to variable2
    print(variable2)  # Output: Hello

    In each of these examples, the value of variable2 is set to the value of variable1. Any changes made to variable1 afterward will not affect the value of variable2.

Please sign in to leave a comment.