Using On User Event

MINI LESSONS ›› Actions Editor ›› Programming Commands ››

MINI LESSON

USING THE ON USER EVENT

One of the more obscure events available within the Actions Editor is the On User Event.


BACKGROUND

ToolBook allows you to programmatically respond to different events which occur as a user interacts with your lesson.


Events are system level messages such as Click, MouseOver, MouseOff. These events are generated automatically by the computer as the user interacts with your lesson.


There is a special event which is never generated/sent automatically by the computer. This is the On User Event. It is only sent when you tell it to be sent. There is no predetermined specific purpose for it, therefore you can use it for whatever purpose you find useful.


Its purpose is not obvious at first glance, so this Mini-Lesson was created to explain how to use it.


OVERVIEW OF LESSON


One way to build this would be to write identical logic (for showing and moving the image) in 3 different places within your page.


Another way is to teach the image how to do this work for itself. We will be using this second way, using the On User Event.

STEP 1

Write the On User Event logic to reposition the image to the correct location, and to ensure it is visible.


This logic goes in the object containing your image - in my case it is a button object named "Image of Arrow".


 

STEP 2

Send the On User Event message to the image when needed.


Recall this is being sent during the:



Below is an example of one of these.


 



Created with the Personal Edition of HelpNDoc: Easily create iPhone documentation