Data File Support
- 12 Jun 2024
- 1 Minute to read
- Print
Data File Support
- Updated on 12 Jun 2024
- 1 Minute to read
- Print
Article summary
Did you find this summary helpful?
Thank you for your feedback
Bundle a data file with a Dise movie so the player can access it. Most datafiles are supported including .json and .txt files.
- Create a text file and save it in C:\DISEContent\Content.
- 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?