Data File Support
  • 12 Jun 2024
  • 1 Minute to read

Data File Support


Article summary

Bundle a data file with a Dise movie so the player can access it. Most datafiles are supported including .json and .txt files. 

  1. Create a text file and save it in C:\DISEContent\Content.
  2. Create a script file pointing to the file and save it in C:\DISEContent\Content.
Example:
#pragma language Python.AXScript.2
filename = DISEScript.GetVariable("File")
DISEScript.Log("filename " + filename)
f = open(filename, "r")
contents = f.read()
message = "Message is " + contents
DISEScript.Log(message)
DISEScript.SetVariable("Message", message)

3. In Composer, go to Movie > Edit variables:

4. Add a new variable:

a. Add a name.

b. Select type 'File'.

c. Browse to the text file.

5. Add a new variable:

a. Add a name

b. Select type 'Text'.

6. Insert a text object 

7. Right click text object and select Connect property > Text / filename

8. Select the variable “Message” from the list and click Ok.

9. Go to Movie > Edit scripts

10. Under Load scripts click Add and browse to your script file. then click Ok

11. Save and upload your template


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.