Time Markers in the Action Timer



How do I use the Action Timer catalog object?

Ever wondered what to do with the Action Timer catalog object? The Action Timer gives you a way of making things happen (hiding or showing an object for example) under very precise timing control.

For example, let's say that you wanted to implement a timer for the following scenario:

In order to coordinate these specific tasks, an Action Timer can be used.


The following information will show how to configure this example above.

Type of Timer

For this example we will be using a Countdown type of timer. Think of this like a timer which you might find on your oven. You set the timer for 30 minutes and it will slowly count down and "ding" when it gets to 0.

We will be doing essentially the same thing, though admittedly our situation is a bit more complex since we need to know when each time interval has completed.

If we look at the scenario above, there is a total of 18 seconds to account for (5 + 3 + 10), so our countdown duration should be set to a total of 18000 milliseconds [1 second = 1000 milliseconds].

Looking at the extended properties of the Action Timer you'll want to configure the General tab as follows:


Also, for our purposes the FIRE EVENTS must be checked and the Auto Start unchecked.


There is also a Time of Day type of timer but the use of that is outside of the scope of this article and will not be discussed here.

Configuring the different time intervals

In order to be notified by ToolBook that 5 seconds (out of the 18 total) have elapsed, and then that 3 more seconds have elapsed, and then that the final 10 seconds have elapsed, we will utilize the Time Marker tab of the Action Timer's extended property editor.

The tricky part about configuring this is thinking about this from a countdown perspective.

In other words, from a countdown perspective, what we really need to know is what exact time will the counter be at for each step of our process.

Using the Time Markers tab we need to enter the 4 times in the Specific Times grid as shown below.


Programming the On Media Timing event

When each of these specific Time Marker times are reached as the timer counts down, ToolBook will send a message to that Action Timer object and that message essentially says:

  A Media Timing Event just occurred for the Time Marker Position of 10000 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 handle the Media Timing Event message.

  1. Open the Actions Editor for the Action Timer object
  2. By default the On Media Complete event will be shown to you
  3. Click on On Media Complete and choose On Media Timing Event from the list offered
  4. You'll notice there is one Parameter called mediaPosition listed to the right of the Event name. This value represents the Time Marker position which has just been reached
  5. Add Programming to hide/show objects based on the value of the mediaPosition parameter


Starting the Action Timer

The last thing to do is to START the timer. The Action Timer does have an Auto Start feature but we don't want to use it in this particular scenario. If you were to enable the Auto Start feature, the timer would start immediately when the page loaded.

For those wondering, yes, this catalog object is very similar (fundamentally) to the Media Timing Events feature of the Universal Media Player. They are very much the same because essentially they count time.

For our needs, since we want to start the timer upon a button click, I've configured my button with the following logic:


This Play command not only can play a Media Player (such as the Universal Media Player) it can play an Action Timer too.

Equally, the Pause and Stop commands can also be used to control an Action Timer if needed.

Created with the Personal Edition of HelpNDoc: Free Kindle producer