Ever wondered how to hide/show certain objects at very specific times as a media file plays within the Universal Media Player (UMP)? To do this, you would use the Time Markers feature of the UMP.
To help explain how to do this, consider the following scenario.
Using the Time Markers tab configure the first 3 time markers.
When each of these specific Time Marker times are reached during the playback of the media file, ToolBook will send a message to that UMP and that message essentially says:
A Media Timing Event just occurred with a Time Marker Position of 4000 ms
In order to respond to this message, so that you can add your Hide/Show logic, you need to use the Actions Editor to respond to the Media Timing Event event message.
It is a very common mistake to write [If mediaPosition of self = xxxx] instead of [If mediaPosition = xxxx].
By asking for [mediaPosition of self] you are not reading the value of the parameter mediaPosition, you are actually asking the UMP:
What is the current position of the media file at this very moment
What's the difference? It takes several milliseconds for ToolBook to send the Media Timing Event message and for your Actions Editor code to process. This means that although the media file may have been 4000 ms into the media file when the Media Timing Event message was sent, by the time your code processes the message it is likely that the current position of the media file will be several milliseconds later...such as 4010.
You'll recall that in the Scenario we wanted to hide all the field objects right after the file finished playing...at 30000 ms.
The easiest way to do this is to simply use the On Media Complete event, which is sent to the UMP when the media has finished playing. You'll notice there are no Parameters in this Event.
Created with the Personal Edition of HelpNDoc: Free HTML Help documentation generator