Data File Support

Prev Next

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