This guide will show you how you can bundle a data file with a Dise movie so you can access them from the player. Most datafiles will work, example of these are .json and .txt files.
Example
- Create a text file with the content “Hello world!” and save it, for example in C:\DISEContent\Content\Message.txt
- Create a script file with the content below and save it for example in C:\DISEContent\Content\ShowMessage.py
ShowMessage.py
#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)
In Composer, go to Movie > Edit variables
Add a new variable.
Give it the name “File”
For type, select File.
Browse to your text file.
Add a new variable
Give it the name “Message”
For type let it be Text
Insert a text object
Right click text object and select Connect property > Text / filename
Select the variable “Message” from the list and click Ok.
Go to Movie > Edit scripts
Under Load scripts click Add and browse to your script file. then click Ok
Save and upload your template
Versions required
- Composer V1.32.12 or later
- Premium V1.32.12 or later
Limitations
Only supported on Premium devices