| <- Last | Tutorial Home | Next -> |
Start setting the branches with the first button, the Play Audio button.
Double click on the button marked Play Audio to see the Object Browser.
Click on the Events tab.
Note: The OZONE is an event driven system. What this means is that every control notifies the OZONE when something is happening to it and when the control does something important. The event lists are different for most controls. Above is the event list for the V_Graph Button control. You see that the first event is Branch on Realize. The very first thing a control does is become realized. Realization is the act of being able to do work like show images, or in the case of a button, take input. You can see that the next event is Click. When a user clicks this button the event is fired and the OZONE is aware that the button was clicked. Next OZONE looks in this _BranchTo property to see what to do when that Click event happens. The other events occur based on the location and action of the cursor relative to this control. We will concentrate of the first two events.
Branch on realize.
When the control first appears in the Output View during script execution it is realized. This Branch is set to tell OZONE what to do next after the control is realized.
While the project is running we want to show the two buttons at the same time and wait for one of them to be pressed before we take a desired branch path. So after the first button shows up we want to show the second. This requires us to branch on realize to the next button. We have already labeled it Exit Button.
Set the branches for this Button control.
Set the branch for the Exit control
Set the branch for the WAV Player control
We want to go back to the buttons once the audio is playing so we can exit with the Exit button, or choose to hear the audio again. To do this we have to branch back to the button. Let's use the MAP view this time.
Switch over to the map view. ![]()
Move the Icons around until they look like this. (This is not required by I find it easier this way.)


Now when the audio plays you can click the buttons again.
We could have set all the branches this way.