[Masters] Events disappear when loading prototype.
I have ran into this problem on several occasions, where i reload a prototype from disk (or via a shared team prototype) and upon checking the events tab for the master components, the events have disappeared.
The way i have setup the prototype is this roughly:
Progressbar in master
- Create a master and have 2 shapes "bg_bar" (width 90% of screen width) and "fg_bar" (width 0), hide these components.
- Create a variable named "total_num_questions" and set it to 0.
- Create a variable named "current_question_num" and set it to 0.
- Create an event "on variable change" for the "total_num_questions" variable with the SHOW action and add a condition "total_num_questions" > 0
- Add action to the ELSE to HIDE "bg_bar" and "fg_bar".
- Create an event "on variable change" for the "current_question_num" to RESIZE a screen component, the "fg_bar" element.
- Select "Calculated" from the width dropdown, and enter the expression:
round( bg_width / total_num_questions * current_question_num, 0 )
- Create a new screen
- On page load event set "total_num_questions" to.. lets say 8.
- Create a panel with a few layers, and within each layer increment the "current_question_num" on "Panel Active" event
- Add a button to change active panel
- Drag the master into the screen, below the panel
The goal of this master is to show a progressbar when a quiz screen is active. The variable "total_num_questions" will change and the bar will show, upon changing active panels the "current_question_num" will change and the "fg_bar" (bar on the foreground which indicates progress) will be resized to reflect the progress of the user.